Changeset View
Changeset View
Standalone View
Standalone View
autotests/tst_filedialog.qml
- This file was added.
1 | import QtQuick 2.2 | ||||
---|---|---|---|---|---|
2 | import QtTest 1.0 | ||||
3 | import QtQuick.Dialogs 1.2 | ||||
4 | TestCase { | ||||
5 | id: testCase | ||||
6 | width: 400 | ||||
7 | height: 400 | ||||
8 | visible: true | ||||
9 | when: windowShown | ||||
10 | name: "FileDialogTest" | ||||
11 | | ||||
12 | FileDialog { | ||||
13 | id: fileDialog | ||||
14 | folder: shortcuts.home | ||||
15 | } | ||||
16 | | ||||
17 | function test_filedialog() { | ||||
18 | //At the moment it just makes sure that something opens and doesn't crash. | ||||
19 | //Since this is a QGuiApplication (and not a QApplication) | ||||
20 | fileDialog.visible = true | ||||
21 | testCase.wait(200) | ||||
22 | fileDialog.visible = false | ||||
23 | } | ||||
24 | } |