I want to change the default QMessageBox
title to something else, so that I don't have to call setWindowTitle
for every individual message box.
How is the default window title chosen?
Best way to do this is to subclass QMessageBox
, e.g.:
class MyMessageBox : public QMessageBox
{
MyMessageBox() //<-- default constructor
{
setWindowTitle("Default title goes here"); //QMessageBox function
}
};
Use MyMessageBox
everywhere in the code.