Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.8, 6.7
-
None
-
e7d0395b4 (dev), d7453add3 (6.7), dd60632f8 (tqtc/lts-6.5)
Description
In the example below, the text's alignment should change to the right:
import QtQuick 2.5 import QtQuick.Window 2.2 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") id: root TextEdit { id: textEdit property string t: qsTr("<b>Enter</b> some text...") text: t // placeholderText: t onImplicitWidthChanged: print("implicitWidth", implicitWidth) textFormat: TextEdit.AutoText // horizontalAlignment: TextEdit.AlignRight width: 200 height: 200 Rectangle { anchors.fill: parent color: "transparent" border.width: 1 opacity: 0.5 } } Timer { running: true interval: 800 onTriggered: { textEdit.horizontalAlignment = TextEdit.AlignRight } } }
If you click in the TextEdit, the mouse cursor will be aligned to the right, however. The text will become right-aligned when you start typing.
Works with 5.7, broken in 5.8.
Setting the alignment declaratively works as expected.