[Interest] QML Text.contentWidth is never increasing
jhihn at gmx.com
Thu Oct 20 23:08:14 CEST 2016
"Returns the width of the text, including width past the width which is covered due to insufficient wrapping if WrapMode is set."
However if it ever enters into a wrapping situtation, it becomes the wrapped width:
|A B C| (decreasing width)
Once at that level, if space is then supplied it stays:
|A B C|
Is there a way to work around this?
I often use it like:
width: contentWidth > parent.width *.9 ? parent.width *.9 : contentWidth
Where I want the text to be it's natural width up to 90% of the parent width, then wrap, but it only works when initially laying out and shrinking.
More information about the Interest