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 3636#include < QClipboard>
3737#include < QDateTime>
3838#include < QDesktopServices>
39+ #include < QDialog>
3940#include < QDoubleValidator>
4041#include < QFileDialog>
4142#include < QFont>
@@ -958,4 +959,11 @@ void PrintSlotException(
958959 PrintExceptionContinue (exception, description.c_str ());
959960}
960961
962+ void ShowModalDialogAndDeleteOnClose (QDialog* dialog)
963+ {
964+ dialog->setAttribute (Qt::WA_DeleteOnClose);
965+ dialog->setWindowModality (Qt::ApplicationModal);
966+ dialog->show ();
967+ }
968+
961969} // namespace GUIUtil
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class QAbstractButton;
4141class QAbstractItemView ;
4242class QAction ;
4343class QDateTime ;
44+ class QDialog ;
4445class QFont ;
4546class QKeySequence ;
4647class QLineEdit ;
@@ -417,6 +418,11 @@ namespace GUIUtil
417418 type);
418419 }
419420
421+ /* *
422+ * Shows a QDialog instance asynchronously, and deletes it on close.
423+ */
424+ void ShowModalDialogAndDeleteOnClose (QDialog* dialog);
425+
420426} // namespace GUIUtil
421427
422428#endif // BITCOIN_QT_GUIUTIL_H
You can’t perform that action at this time.
0 commit comments