diff options
Diffstat (limited to 'tests/auto/quickwidgets/qquickwidget/data/FocusOnClick.qml')
-rw-r--r-- | tests/auto/quickwidgets/qquickwidget/data/FocusOnClick.qml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/quickwidgets/qquickwidget/data/FocusOnClick.qml b/tests/auto/quickwidgets/qquickwidget/data/FocusOnClick.qml new file mode 100644 index 0000000000..6b1ca0f15a --- /dev/null +++ b/tests/auto/quickwidgets/qquickwidget/data/FocusOnClick.qml @@ -0,0 +1,33 @@ +import QtQuick + +Rectangle { + width: 300 + height: 100 + color: "lightblue" + Column { + Rectangle { + width: 150 + height: 50 + color: text1.activeFocus ? "pink" : "gray" + TextInput + { + id: text1 + objectName: "text1" + anchors.fill: parent + text: "Enter text" + } + } + Rectangle { + width: 150 + height: 50 + color: text2.activeFocus ? "yellow" : "lightgreen" + TextInput + { + id: text2 + objectName: "text2" + anchors.fill: parent + text: "Enter text" + } + } + } +} |