I`ve got one small question, about MessageBox, especially about property setWindowIson(). I would like to know if there is a possibility to hide this icon that appears in this MessageBox?
I`ve got one small question, about MessageBox, especially about property setWindowIson(). I would like to know if there is a possibility to hide this icon that appears in this MessageBox?
Maybe QMessageBox::NoIcon ?
No this icon. I mean the icon in title bar. Next to title of a messagebox
Can anyone help me?
If you do not need the system icons, you could try something like
Qt Code:
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
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.Qt Code:
m.setWindowIcon("MyCompletlyTransparentIcon.png");To copy to clipboard, switch view to plain text mode
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