I am using a QMessageBox in the standard way to query if the user really wants to quit. I intercept the closeEvent, call an OKToClose() function. It does this
bool AlvGUI::OKToClose()
{
int ret
= QMessageBox::warning(this, tr
("Alvin Pilot GUI"),
tr("You are quitting the Alvin Graphical User Interface.\n""Do you really want to quit?"),
return true;
return false;
return false;
}
bool AlvGUI::OKToClose()
{
int ret = QMessageBox::warning(this, tr("Alvin Pilot GUI"),
tr("You are quitting the Alvin Graphical User Interface.\n""Do you really want to quit?"),
QMessageBox::Yes | QMessageBox::Default,
QMessageBox::No,
QMessageBox::Cancel | QMessageBox::Escape);
if (ret == QMessageBox::Yes)
return true;
else if (ret == QMessageBox::Cancel)
return false;
return false;
}
To copy to clipboard, switch view to plain text mode
when I don't use a stylesheet, everything works the way it should. However, when I use a stylesheet (that does not ever mention QMessageBox) the QPushButtons on the QMessageBox are sized too small, cutting off the text.
QPushButton occurs in my stylesheet, but I never set sizes, etc.
I have found a bug report that seems like it might be relevant
http://bugreports.qt.nokia.com/browse/QTBUG-10246
but I'm not explicity setting min-size. Any other ideas on what might be going on or how to fix it?
thanks
Bookmarks