![]() |
2010-06-10
, 19:43
|
Posts: 341 |
Thanked: 57 times |
Joined on Nov 2009
|
#1
|
![]() |
2010-06-10
, 19:50
|
Posts: 3,617 |
Thanked: 2,412 times |
Joined on Nov 2009
@ Cambridge, UK
|
#2
|
![]() |
2010-06-11
, 09:59
|
Posts: 341 |
Thanked: 57 times |
Joined on Nov 2009
|
#3
|
![]() |
2010-06-11
, 10:13
|
Posts: 3,617 |
Thanked: 2,412 times |
Joined on Nov 2009
@ Cambridge, UK
|
#4
|
![]() |
2010-06-11
, 11:02
|
Posts: 341 |
Thanked: 57 times |
Joined on Nov 2009
|
#5
|
![]() |
2010-06-11
, 11:57
|
Posts: 341 |
Thanked: 57 times |
Joined on Nov 2009
|
#6
|
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();
![]() |
2010-06-11
, 12:56
|
Posts: 3,617 |
Thanked: 2,412 times |
Joined on Nov 2009
@ Cambridge, UK
|
#7
|
Alright thanks, but for the picture I've mentioned above, exactly which form of a Dialog is being used (e.g. QDialog, etc ..), and are those the ordinary Push Buttons that you see all over this Dialog ? ... I'm ask this because the first 3 buttons have a heading mentioned (e.g. 'Local Data Source'), and then a value mentioned next to it too (e.g. 'Built-in') in an orange color .. so this can't be an ordinary push button, can it ?
![]() |
2010-06-11
, 12:58
|
Posts: 3,617 |
Thanked: 2,412 times |
Joined on Nov 2009
@ Cambridge, UK
|
#8
|
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 ...
... I get the following type of popup: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();
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 ?
![]() |
2010-06-11
, 13:42
|
Posts: 341 |
Thanked: 57 times |
Joined on Nov 2009
|
#9
|
![]() |
2010-06-11
, 13:57
|
|
Posts: 81 |
Thanked: 62 times |
Joined on Aug 2009
@ Nagoya, Japan
|
#10
|