Ok I got another question ... I'm trying to generate a Dialog box with a custom set of buttons and other controls, but one which looks similar to this: That is, it pops up from the bottom of the screen in upwards direction, and does not occupy the entire screen (so that you can click outside the popup to hide it away again) ... However, when I use the following code ... Code: QPushButton *b1 = new QPushButton(tr("Yes")); QPushButton *b2 = new QPushButton(tr("No")); b1->setDefault(true); b2->setAutoDefault(false); QDialogButtonBox * xx = new QDialogButtonBox(Qt::Vertical); xx->addButton(b1,QDialogButtonBox::YesRole); xx->addButton(b2,QDialogButtonBox::NoRole); xx->setWindowTitle(tr("Testing")); xx->setCenterButtons(true); xx->show(); ... I get the following type of popup: How can I make it like the first one, such that it doesnt occupy the entire screen, and also 'pops up' from the bottom of the screen ?
QPushButton *b1 = new QPushButton(tr("Yes")); QPushButton *b2 = new QPushButton(tr("No")); b1->setDefault(true); b2->setAutoDefault(false); QDialogButtonBox * xx = new QDialogButtonBox(Qt::Vertical); xx->addButton(b1,QDialogButtonBox::YesRole); xx->addButton(b2,QDialogButtonBox::NoRole); xx->setWindowTitle(tr("Testing")); xx->setCenterButtons(true); xx->show();