Search code examples
qtcheckbox

Remove checkbox from QErrorMessage


writing in QT and QErrorMessage by default has checkbox saying:

Show this message again

Is there some way to remove this checkbox, so user won't be able to turn off this message?


Solution

  • Instead of using QErrorMessage use QMessageBox::critical or QMessageBox::warning.

    If you need to customise the message box further you can create an instance of QMessageBox and then exec it.