test item gets the focus as suggested by mzanetti
commitaa1c784e2a282a430722859a2b319a221e63db48
authorAlbert Astals Cid <albert.astals@canonical.com>
dateThu 26 Mar 2015, 16:24 (12 years ago)
parenta529370
qml/Components/Dialogs.qml+1
@@ -57,6 +57,7 @@ Item {
5757 }
5858 Loader {
5959 id: dialogLoader
60+ objectName: "dialogLoader"
6061 anchors.fill: parent
6162 active: false
6263 }
tests/qmltests/Components/tst_Dialogs.qml+3−1
@@ -96,9 +96,11 @@ Rectangle {
9696 name: "Dialogs"
9797 when: windowShown
9898
99− function showPowerDialog() {
99+ function test_showPowerDialog() {
100100 var dialogsPrivate = findInvisibleChild(dialogs, "dialogsPrivate");
101101 dialogsPrivate.showPowerDialog();
102+ var dialogLoader = findInvisibleChild(dialogs, "dialogLoader");
103+ tryCompare(dialogLoader.item, "focus", true);
102104 }
103105 }
104106}