File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,4 @@ Views.AppWindow {
355
355
font .family : " Courier"
356
356
}
357
357
}
358
-
359
-
360
-
361
358
}
Original file line number Diff line number Diff line change 1
1
import QtQuick 2.3
2
2
import QtQuick.Controls 1.2
3
3
import QtQuick.Dialogs 1.0
4
+ import Qt.labs.settings 1.0
4
5
5
6
ApplicationWindow {
6
7
id: root
@@ -21,11 +22,15 @@ ApplicationWindow {
21
22
radius: theme .windowRadius
22
23
}
23
24
25
+ Settings {
26
+ property alias url: root .activeDatabase
27
+ }
28
+
24
29
property alias fileDialog : _FileDialog
25
30
FileDialog {
26
31
id: _FileDialog
27
32
title: " Please choose a file"
28
- nameFilters: [ " SQLite3 Databases (*.db *.sqlite3 *.sqlite)" , " All files (*)" ]
33
+ nameFilters: [ " SQLite3 Databases (*.db *.sqlite3 *.sqlite *.sql3 )" , " All files (*)" ]
29
34
onAccepted: {
30
35
activeDatabase = fileUrl
31
36
}
@@ -36,8 +41,9 @@ ApplicationWindow {
36
41
title: qsTr (" File" )
37
42
MenuItem {
38
43
text: qsTr (" &Open" )
44
+ shortcut: StandardKey .Open
39
45
onTriggered: {
40
-
46
+ fileDialog . open ()
41
47
}
42
48
}
43
49
MenuItem {
You can’t perform that action at this time.
0 commit comments