diff --git a/Label-and-Flickable-combination-to-avoid-text-elide.md b/Label-and-Flickable-combination-to-avoid-text-elide.md new file mode 100644 index 0000000..65d869f --- /dev/null +++ b/Label-and-Flickable-combination-to-avoid-text-elide.md @@ -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 + } + } + } +``` \ No newline at end of file