diff --git a/src/qt/createwalletdialog.cpp b/src/qt/createwalletdialog.cpp
index 38c6bfe56a..2ded6a1d89 100644
--- a/src/qt/createwalletdialog.cpp
+++ b/src/qt/createwalletdialog.cpp
@@ -35,11 +35,28 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
}
});
-#ifndef USE_SQLITE
- ui->descriptor_checkbox->setToolTip(tr("Compiled without sqlite support (required for descriptor wallets)"));
- ui->descriptor_checkbox->setEnabled(false);
- ui->descriptor_checkbox->setChecked(false);
-#endif
+ connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [this](bool checked) {
+ // Disable the encrypt_wallet_checkbox when isDisablePrivateKeysChecked is
+ // set to true, enable it when isDisablePrivateKeysChecked is false.
+ ui->encrypt_wallet_checkbox->setEnabled(!checked);
+
+ // Wallets without private keys start out blank
+ if (checked) {
+ ui->blank_wallet_checkbox->setChecked(true);
+ }
+
+ // When the encrypt_wallet_checkbox is disabled, uncheck it.
+ if (!ui->encrypt_wallet_checkbox->isEnabled()) {
+ ui->encrypt_wallet_checkbox->setChecked(false);
+ }
+ });
+
+ #ifndef USE_SQLITE
+ ui->descriptor_checkbox->setToolTip(tr("Compiled without sqlite support (required for descriptor wallets)"));
+ ui->descriptor_checkbox->setEnabled(false);
+ ui->descriptor_checkbox->setChecked(false);
+ #endif
+
}
CreateWalletDialog::~CreateWalletDialog()
diff --git a/src/qt/forms/createwalletdialog.ui b/src/qt/forms/createwalletdialog.ui
index b592140dd7..ea713e1abd 100644
--- a/src/qt/forms/createwalletdialog.ui
+++ b/src/qt/forms/createwalletdialog.ui
@@ -38,6 +38,9 @@
24
+
+ Wallet
+
@@ -68,17 +71,33 @@
Encrypt Wallet
- true
+ false
+
+
+
+
+
+ 20
+ 90
+ 130
+ 21
+
+
+
+ font-weight:bold;
+
+
+ Advanced options
- false
+ true
20
- 80
+ 115
171
22
@@ -94,8 +113,8 @@
20
- 110
- 171
+ 135
+ 220
22
@@ -110,7 +129,7 @@
20
- 140
+ 155
171
22
@@ -128,6 +147,7 @@
encrypt_wallet_checkbox
disable_privkeys_checkbox
blank_wallet_checkbox
+ descriptor_checkbox