diff options
Diffstat (limited to 'tests/auto/quick/qquicktext/data')
-rw-r--r-- | tests/auto/quick/qquicktext/data/hAlignWidthDependsOnImplicitWidth.qml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktext/data/hAlignWidthDependsOnImplicitWidth.qml b/tests/auto/quick/qquicktext/data/hAlignWidthDependsOnImplicitWidth.qml new file mode 100644 index 0000000000..4358a58f57 --- /dev/null +++ b/tests/auto/quick/qquicktext/data/hAlignWidthDependsOnImplicitWidth.qml @@ -0,0 +1,25 @@ +import QtQuick 2.6 + +Item { + width: 200 + height: 200 + + property alias text: label.text + property alias horizontalAlignment: label.horizontalAlignment + property alias elide: label.elide + property int extraWidth: 0 + + Rectangle { + border.color: "red" + x: 100 + width: label.implicitWidth + extraWidth + height: label.implicitHeight + + Text { + id: label + anchors.fill: parent + text: 'press me' + horizontalAlignment: Text.AlignHCenter + } + } +} |