Unsolved can i add a checkbox just above the buttons in a QMessageBox ?
-
i know you can add buttons into the button bar but what about a check box just above it? how ?
-
@davecotter You can subclass QMessageBox and add what ever you want there
-
okay is there an example for this? i want to put it just above the row of buttons at the bottom, how do i ensure the dialog will expand to accommodate?
-
@davecotter said in can i add a checkbox just above the buttons in a QMessageBox ?:
how do i ensure the dialog will expand to accommodate?
Using layouts.
I'm not aware of such examples.
-
Why not use
QMessageBox::setCheckBox()
? If you do not use it, you must use layout(QGridLayout
) as @jsulm mentions. -
@davecotter said in can i add a checkbox just above the buttons in a QMessageBox ?:
i know you can add buttons into the button bar but what about a check box just above it? how ?
It is in principle possible with some black magic incantations. However, if you want to customize it further than already suggested, I advise you to make your own custom message box dialog in designer and take it from there.