QProgressDialog: remove cancel button doesn't remove key handling of cancel button?
-
I have a progress dialog on startup, showing, well ... startup progress.
there isn't a cancel buttton cuz i removed it (setCancelButton(NULL))
however, hitting esc, cmd-., ctrl-c causes the dialog to dismiss itself.
without overriding this dialog, how do i disable that?
:)
-
Install an event filter and check for the close event.
This worked!! Thanks!!
-
according to this topic, i tried this:
disconnect(this, SIGNAL(canceled()), this, SLOT(cancel()));
yet the escape key STILL cancels the dialog. ??
-
Derive from QProcessDialog and override the closeEvent()
-
quote:
without overriding this dialog, how do i disable that?
if there isn't any way to do it without overriding, then there you have it.
But i was wondering if there IS in fact a way?
-
There are basically two ways to deal with events - overriding and event filters. Since you don't want to override you're left with the latter. Install an event filter and check for the close event.
-
Install an event filter and check for the close event.
This worked!! Thanks!!