From e6a2b94b6fb2eb588779d8bfdf71f29df3ee1c85 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 27 Jul 2020 14:16:12 +0100 Subject: [PATCH] Disallow closing progress dialogs early * Normally the close button is hidden but some platforms don't allow this. --- qrenderdoc/Code/QRDUtils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Code/QRDUtils.cpp b/qrenderdoc/Code/QRDUtils.cpp index 724109b22..caea8a154 100644 --- a/qrenderdoc/Code/QRDUtils.cpp +++ b/qrenderdoc/Code/QRDUtils.cpp @@ -25,6 +25,7 @@ #include "QRDUtils.h" #include #include +#include #include #include #include @@ -1948,7 +1949,7 @@ public: setWindowFlags(Qt::CustomizeWindowHint | Qt::Dialog | Qt::WindowTitleHint); setWindowIcon(QIcon()); setMinimumSize(QSize(250, 0)); - setMaximumSize(QSize(250, 10000)); + setMaximumSize(QSize(500, 200)); setCancelButton(NULL); setMinimumDuration(0); setWindowModality(Qt::ApplicationModal); @@ -1994,7 +1995,7 @@ protected: QProgressDialog::keyPressEvent(e); } - + void closeEvent(QCloseEvent *event) override { event->ignore(); } QLabel m_Label; static const int maxProgress = 1000;