Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
Qt for MCUs 2.3.1
-
None
Description
link : https://doc.qt.io/QtForMCUs-2.3/qtul-fonts.html#text-alignment
I'm trying out the code snippet shown in the link above.
// automatically aligned to the left Text { text: "Phone" width: 200 } // automatically aligned to the right Text { text: "خامل" width: 200 } // aligned to the left Text { text: "خامل" horizontalAlignment: Text.AlignLeft width: 200 }
According to the code, the second Arabic sentence should be aligned to right, but it's not so on my end with this code.
import QtQuick 2.0Rectangle { id: root color: "white" width: 320 height: 480 z:10 // Column{ // automatically aligned to the left Text { id: t1 text: "Phone" width: root.width } // automatically aligned to the right Text { id: t2 text: "خامل" width: root.width anchors.top: t1.bottom } // aligned to the left Text { id: t3 text: "خامل" horizontalAlignment: Text.AlignLeft width: root.width anchors.top: t2.bottom } // } }
Here is the outcome of the code snippet above. As you can see, the second Arabic text is aligned to left, not right. Given the fact that the width of the second Text component is the same as the root(320), the Arabic text should've been touching the right edge of the window.