Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
Qt for MCUs 2.2.1
-
QUL Sprint 4.1/2022
Description
If using Text.Wrap wrapping mode in a Text (or any other than Text.NoWrap), punctuation marks (. , ! ?, etc.) that are entered without space next to a word might get wrapped to next line. The current behavior seems to be inconsistent when compared with Qt 6 QML text wrapping handling where it moves the whole word attached to the punctuation mark to the next line if wrapping triggers. So, I'd believe this is a bug. It would be better that the previous word would also be wrapped to next line together with the punctuation mark.
As an example, the following QML snippet demonstrates the issue:
Rectangle {
width: 200
height: 200
Text
{
anchors.fill: parent
anchors.margins: 20
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: "A long text field."
wrapMode: Text.Wrap
}
}