Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.1, 5.6.1, 5.7.0 Beta
-
None
-
79cfc8788d6267eeb263983466ba21758f618dcd
Description
A certain combination of width/height/implicitWidth/implicitHeight bindings and horizontalAlignment != Text.AlignLeft causes the text to get mis-aligned when the textual content is changed. A simple test case:
import QtQuick 2.3 import QtQuick.Window 2.2 Window { width: 200 height: 200 visible: true Rectangle { border.color: "red" anchors.centerIn: parent width: label.implicitWidth // note: label.contentWidth works height: label.implicitHeight Text { id: label anchors.fill: parent text: !ma.pressed ? "press me" : "this is mis-aligned" horizontalAlignment: Text.AlignHCenter // or Text.AlignRight } } MouseArea { id: ma anchors.fill: parent } }
Attachments
Issue Links
- is required for
-
QTBUG-50740 Button: mis-aligned text
- Closed