-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.7.2
-
None
-
-
52b5aaaab (dev), 182624225 (6.9), b4b4fc74c (6.8)
Using the minimal example below shows a weird behavior of the implicitWidth of Text.
It looks like Windows is affected when a screen scaling of 100% is used in the windows settings:
With 150% or another scaling, everything works fine:
Our expectation is, that implicitWidth always reports the width of the text as single line text with no line breaks.
Edit: Android ist also affected in general while on iOS the behavior on iOS depends on the font size.
import QtQuick import QtQuick.Controls import QtQuick.Layouts ApplicationWindow { color: "lightgreen" height: 300 visible: true width: 400 ColumnLayout { anchors.fill: parent Text { id: testing text: "A long text to show the behavior with RichText." textFormat: Text.RichText wrapMode: Text.Wrap } Text { text: testing.implicitWidth } } }
| For Gerrit Dashboard: QTBUG-129143 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 614141,6 | Text: calculate implicitWidth even when width hasn't been set | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 615092,2 | Text: calculate implicitWidth even when width hasn't been set | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 615414,2 | Text: calculate implicitWidth even when width hasn't been set | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |