If you do not need the system icons, you could try something like
m.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
QMessageBox m(parent);
m.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
To copy to clipboard, switch view to plain text mode
Alternatively, you could create a completely transparent icon and assign it to the message box object
m.setWindowIcon("MyCompletlyTransparentIcon.png");
m.setWindowIcon("MyCompletlyTransparentIcon.png");
To copy to clipboard, switch view to plain text mode
This has the drawback that the dialog title still is shown at its original position, i.e. it is not shown at the left border.
Your question is not specific to QMessageBox. It applies to QDialog equally. Searching the WEB for "hiding icon on QDialog title bar" or something similar will show you some platform specific solutions.
Bookmarks