Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.2
-
None
Description
Looks ok with Text.RichText. Looks incorrect with Text.StyledText.
Test app:
import QtQuick import QtQuick.Controls import QtQuick.Layouts Window { //color: "#41CD52" id:root visible: true width: 800 height: 480 property int letterSpacing: 0 Slider { id: spacingSlider width: root.width * 0.8 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 20 from: -40 to: 40 value: 0 onValueChanged: { root.letterSpacing = value } } Text { id: englishText text: "Sample <img src=\"images/qtlogo.png\"> Text in English" font.pixelSize: 24 textFormat: Text.StyledText font.letterSpacing: root.letterSpacing // anchors.horizontalCenter: parent.horizontalCenter y: spacingSlider.height + spacingSlider.y + 20 // Position below the slider with some spacing } Text { id: arabicText text: "نص عربي للمثال" font.pixelSize: 24 font.letterSpacing: root.letterSpacing // anchors.horizontalCenter: parent.horizontalCenter y: englishText.height + englishText.y + 20 // Position below the English text with some spacing } }