I have an application where I want to ask the user a question in a QMessageBox
and then respond accordingly. The problem is that on a Mac I want the dialog to show up as a Sheet, but using the open()
method returns immediately.
QMessageBox* msgBox = new QMessageBox(
QMessageBox::Question,
"Delete Record?",
"Are you sure you want to delete this record?"
QMessageBox::Yes | QMessageBox::No,
this,
Qt::Sheet);
int ret = msgBox->exec(); // does not show up as a sheet on Mac
msgBox->open(); // shows up as a sheet but returns immediately
Is there anyway I can get which button the user pressed on a sheet without having to implement my own QDialog
? Is there any signal from msgBox
I connect?