aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_textfield.qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-01-10 16:47:26 +0100
committerLiang Qi <liang.qi@qt.io>2019-01-10 16:47:26 +0100
commitefa04c2ae8427c70848477ace3d8f6e82baaab11 (patch)
treec0394c9cd5ce51961337a7a15e169074dd41632b /tests/auto/controls/data/tst_textfield.qml
parent9c7429219d36e8eb40e1fe6e679715c89209fc40 (diff)
parent6476de0b669162cf08c11f5c8d5ad0b42419f365 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: .qmake.conf src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: I27f1260b539354e084beb28be78385e57fda63e1
Diffstat (limited to 'tests/auto/controls/data/tst_textfield.qml')
-rw-r--r--tests/auto/controls/data/tst_textfield.qml31
1 files changed, 29 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_textfield.qml b/tests/auto/controls/data/tst_textfield.qml
index 963046e4..2ee1db41 100644
--- a/tests/auto/controls/data/tst_textfield.qml
+++ b/tests/auto/controls/data/tst_textfield.qml
@@ -48,9 +48,10 @@
**
****************************************************************************/
-import QtQuick 2.2
+import QtQuick 2.12
import QtTest 1.0
-import QtQuick.Controls 2.2
+import QtQuick.Controls 2.12
+import QtQuick.Layouts 1.12
TestCase {
id: testCase
@@ -633,4 +634,30 @@ TestCase {
compare(control.background.height, 100)
}
+ Component {
+ id: layoutComponent
+
+ ColumnLayout {
+ anchors.fill: parent
+
+ property alias textField: textField
+
+ TextField {
+ id: textField
+ placeholderText: "Placeholder"
+ Layout.fillWidth: true
+ }
+ }
+ }
+
+ function test_inLayout() {
+ var layout = createTemporaryObject(layoutComponent, testCase)
+ verify(layout)
+
+ var control = layout.textField
+ verify(control)
+
+ compare(control.width, control.parent.width)
+ compare(control.background.width, control.width)
+ }
}