Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.8.0
-
MacOS Sierra (10.12.4)
Description
When I set the width of a Text item to implicitWidth (i.e. Layout.maximumWidth: implicitWidth) and center it in a ColumnLayout, the text will sometimes wrap even though there is plenty of space. Changing the width of the column (by dynamically resizing the window) causes the problem to come and go; it goes on/off for each pixel that the width changes. If I align the Text item to either left or right instead of center, then the problem goes away. Adding one to the Text width (i.e. Layout.maximumWidth: implicitWidth + 1) alleviates the problem so that the wrapping does not occur, which leads me to believe that it's a bad calculation of implicitWidth.
Because I can make it go away by adding one and because it goes on/off for each pixel the column width changes, my hunch is that there's a division by 2 round-off error related to centering.
Attachments
For Gerrit Dashboard: QTBUG-61244 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
205593,3 | Prevent changing the width for layout item's rect | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |