File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 5
5
import QtQuick 2.15
6
6
import QtQuick.Controls 2.15
7
7
import QtQuick.Layouts 1.15
8
+ import QtQuick.Dialogs 1.3
9
+
10
+ import org.bitcoincore.qt 1.0
11
+
8
12
import "../controls"
9
13
10
14
ColumnLayout {
@@ -19,11 +23,30 @@ ColumnLayout {
19
23
description: qsTr (" Your application directory." )
20
24
recommended: true
21
25
checked: true
26
+ onClicked: {
27
+ onboardingModel .defaultReset ()
28
+ }
22
29
}
23
30
OptionButton {
24
31
Layout .fillWidth : true
25
32
ButtonGroup .group : group
26
33
text: qsTr (" Custom" )
27
34
description: qsTr (" Choose the directory and storage device." )
35
+ onClicked: fileDialog .open ()
36
+ }
37
+ FileDialog {
38
+ id: fileDialog
39
+ selectFolder: true
40
+ folder: onboardingModel .getDefaultDataDirectory
41
+ onAccepted: {
42
+ onboardingModel .setCustomDataDirString (fileDialog .fileUrls [0 ].toString ())
43
+ var customDataDir = fileDialog .fileUrl .toString ();
44
+ if (customDataDir !== " " ) {
45
+ onboardingModel .setCustomDataDirArgs (customDataDir);
46
+ }
47
+ }
48
+ onRejected: {
49
+ console .log (" Canceled" )
50
+ }
28
51
}
29
- }
52
+ }
You can’t perform that action at this time.
0 commit comments