Hi,
In a QDialog constructor I do that:
Qt Code:
try { } catch(std::bad_alloc e) { // How I can abort this QDialog and avoid to be show? }To copy to clipboard, switch view to plain text mode
How I can abort this QDialog and avoid to be show?
Hi,
In a QDialog constructor I do that:
Qt Code:
try { } catch(std::bad_alloc e) { // How I can abort this QDialog and avoid to be show? }To copy to clipboard, switch view to plain text mode
How I can abort this QDialog and avoid to be show?
I don't understand. How can you add that try/catch block in QDialog constructor if it is Qt base class?
The constructor doesn't show the dialog. A call to show() or exec() does that. You can override it by reimplementing showEvent() and hiding the component there, by intercepting the call that shows the dialog or simply by not calling show() or exec() at all.
Tino (29th July 2009)
Bookmarks