-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.7.0
-
None
Text is seems to be aligned incorrectly in some cases.
import QtQuick 2.0 import QtQuick.Controls 1.0 import QtQuick.Layouts 1.0 ApplicationWindow { width: 400 height: 400 visible: true property var settings: [ {italic: true}, {letterSpacing: -10}, {wordSpacing: -30}, {lineHeight: 0.6} // does not work in old versions of Qt, but OK in Qt 5.7 ] GridLayout { anchors.centerIn: parent rows: 2 columns: 2 Repeater { model: settings Text { Layout.preferredWidth: 150 Layout.preferredHeight: 150 text: "Text\n123" + (modelData.wordSpacing ? " " : "") clip: true font.pointSize: 40 font.italic: modelData.italic || false font.letterSpacing: modelData.letterSpacing || 0 font.wordSpacing: modelData.wordSpacing || 0 lineHeight: modelData.lineHeight || 1 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignBottom Rectangle { anchors.fill: parent color: "transparent" border.color: "red" border.width: 1 } } } } }
I expect that text in all cases will not be clipped by bounds.