File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
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 {
@@ -25,5 +29,21 @@ ColumnLayout {
25
29
ButtonGroup .group : group
26
30
text: qsTr (" Custom" )
27
31
description: qsTr (" Choose the directory and storage device." )
32
+ onClicked: fileDialog .open ()
33
+ }
34
+ FileDialog {
35
+ id: fileDialog
36
+ selectFolder: true
37
+ folder: optionsModel .getDefaultDataDirectory
38
+ onAccepted: {
39
+ optionsModel .setCustomDataDirString (fileDialog .fileUrls [0 ].toString ())
40
+ var customDataDir = fileDialog .fileUrl .toString ();
41
+ if (customDataDir !== " " ) {
42
+ optionsModel .setCustomDataDirArgs (customDataDir);
43
+ }
44
+ }
45
+ onRejected: {
46
+ console .log (" Custom datadir selection canceled" )
47
+ }
28
48
}
29
49
}
You can’t perform that action at this time.
0 commit comments