[Solved] QMessagebox that cannot be closed by user?
I am displaying a QMessageBox to the user in a situation, where I want to have control when the message box can be closed.
It would not be a good UX if I kept the close & OK buttons & implemented some function to ignore them, because the user would then be expecting the window to close. So my requirement is:
- Remove close button
- Remove the OK button
- Make it impossible for the user to be able to close the message box
Here is the code:
@ QMessageBox *msg = new QMessageBox();
I tried by setting the windowflags, but instead removing close button, it added minimise & maximise buttons.
In that case, why not just show something like a frameless QLabel ?
Can you tell me how to get a frameless QLabel?
Some code please?
Because when I replace QMessageBox with QLabel in above code I am getting minimise, maximise & close buttons as well.
Somehow the window flags just dont work...
Humm maybe @#include <QLabel>
Ps: this is not going to look nice..
Yes, That Is why I am asking about QMessageBox... :)
IIRC, using Qt::FramelessWindowHint