File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 36
36
#include < QClipboard>
37
37
#include < QDateTime>
38
38
#include < QDesktopServices>
39
+ #include < QDialog>
39
40
#include < QDoubleValidator>
40
41
#include < QFileDialog>
41
42
#include < QFont>
@@ -958,4 +959,11 @@ void PrintSlotException(
958
959
PrintExceptionContinue (exception, description.c_str ());
959
960
}
960
961
962
+ void ShowModalDialogAndDeleteOnClose (QDialog* dialog)
963
+ {
964
+ dialog->setAttribute (Qt::WA_DeleteOnClose);
965
+ dialog->setWindowModality (Qt::ApplicationModal);
966
+ dialog->show ();
967
+ }
968
+
961
969
} // namespace GUIUtil
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class QAbstractButton;
41
41
class QAbstractItemView ;
42
42
class QAction ;
43
43
class QDateTime ;
44
+ class QDialog ;
44
45
class QFont ;
45
46
class QKeySequence ;
46
47
class QLineEdit ;
@@ -417,6 +418,11 @@ namespace GUIUtil
417
418
type);
418
419
}
419
420
421
+ /* *
422
+ * Shows a QDialog instance asynchronously, and deletes it on close.
423
+ */
424
+ void ShowModalDialogAndDeleteOnClose (QDialog* dialog);
425
+
420
426
} // namespace GUIUtil
421
427
422
428
#endif // BITCOIN_QT_GUIUTIL_H
You can’t perform that action at this time.
0 commit comments