I want to make like an Autoupdate dialog, that cannot be exited, closed, or interrupted.
Is there a way for QDialog to remove the "X" button and possible not close until some sort of signal or another class says it can?
Printable View
I want to make like an Autoupdate dialog, that cannot be exited, closed, or interrupted.
Is there a way for QDialog to remove the "X" button and possible not close until some sort of signal or another class says it can?
Try reimplementing QDialog::done(), if it's not enough, you can always reimplement QWidget::closeEvent().
I would just use a frameless modal widget for that - no window buttons tempting to be pressed :)
Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.
This is what it says for QDialog::done... so I don't think that disables the X button etc.
I know in Win API they had WS_ window style options to hide certain menus, such as "x", minimize, or the title bar. Is there anything like that for QDialog?
I used designer to make the QDialog, so I dont know how I would convert it to a modal widget without a frame.
Set a Qt::FramelessWindowHint flag for your widget (it doesn't have to be a dialog, unless you need the local event loop).