http://doc.qt.io/qt-5/qml-qtquick-text.html#contentWidth-prop
"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)

|A B|
|C  |

|A|
|B|
|C|

Once at that level, if space is then supplied it stays:
|A  |
|B  |
|C  |

Rather than 
|A B|
|C  |

|A B C|


Is there a way to work around this?
I often use it like:
Text {
        id: instructionText
        color: "white"
        text: instructionTextData
        width: contentWidth > parent.width *.9 ? parent.width *.9 : contentWidth
        font.pointSize: 16
        horizontalAlignment: Text.AlignHCenter
        anchors.horizontalCenter: parent.horizontalCenter
}

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. 
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to