parent
e71d52a70a
commit
c160eda79a
@ -0,0 +1,33 @@
|
||||
### Label and Flickable combination to avoid text elide
|
||||
|
||||
```
|
||||
Flickable{
|
||||
id: nameFlickable
|
||||
Layout.preferredWidth: nameHeaderLabel.width
|
||||
Layout.preferredHeight: nameHeaderLabel.height
|
||||
contentHeight: height
|
||||
contentWidth: nameLabel.width
|
||||
clip: true
|
||||
interactive: false
|
||||
|
||||
Label{
|
||||
id: nameLabel
|
||||
text: name_
|
||||
horizontalAlignment: "AlignLeft"
|
||||
}
|
||||
|
||||
SequentialAnimation{
|
||||
id: scrollAnimation
|
||||
loops: NumberAnimation.Infinite
|
||||
running: nameLabel.width > nameFlickable.width
|
||||
|
||||
NumberAnimation{
|
||||
target: nameFlickable
|
||||
duration: ((nameLabel.width)+nameFlickable.width)/0.04342
|
||||
property: "contentX"
|
||||
from: - nameFlickable.contentWidth
|
||||
to: nameFlickable.contentWidth
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
Loading…
Reference in new issue