[Qt-interest] QDialog on Vista hides buttons

Dominic Stalder dominic.stalder at bluewin.ch
Thu Jan 7 00:09:03 CET 2010


Yes sorry, it's a QWizard!

The buttons should be there, because on Mac OS X and Windows XP it 
works. Here we go:

GameWizard::GameWizard(QWidget *parent)
: QWizard(parent, Qt::CustomizeWindowHint | Qt::WindowTitleHint | 
Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint)
{
     // sets the window title
     setWindowTitle(tr("New Game Wizard"));

     // sets the dialog size (not resizable)
#ifdef WIN32
     setFixedSize(QSize(600, 500));
#else
     setFixedSize(QSize(640, 480));
#endif

     // sets the wizard background (dialog's background in OS X, 
dialog's page header background in Windows)
     setPixmap(QWizard::BackgroundPixmap, 
QPixmap(":/res/images/wizardbackground.png"));

     // sets the text of the buttons
     setButtonText(QWizard::CancelButton, tr("Cancel"));
     setButtonText(QWizard::CustomButton1, tr("S&kip >>"));
     setButtonText(QWizard::BackButton, tr("< &Back"));
     setButtonText(QWizard::NextButton, tr("&Next >"));

     // defines the default button layout
     lytButtonsDefault << QWizard::Stretch
<< QWizard::CancelButton
<< QWizard::NextButton
<< QWizard::FinishButton;

     // defines the button layout with the back and the skip layout
     lytButtonsBackSkip << QWizard::CustomButton1
<< QWizard::Stretch
<< QWizard::CancelButton
<< QWizard::BackButton
<< QWizard::FinishButton;

     // defines the button layout for the quick start game
     lytButtonsQuickStart << QWizard::Stretch
<< QWizard::CancelButton
<< QWizard::BackButton
<< QWizard::FinishButton;

     // sets the default button layout
     setButtonLayout(lytButtonsDefault);

     // creates all the pages for the game wizard
     gameIntroPage = new GameIntroPage(this);
     balanceBoardPage = new BalanceBoardPage(this);
     controllerPage = new ControllerPage(this);
     playerPage = new PlayerPage(this);
     trainingLevelPage = new TrainingLevelPage(this);
     quickStartPage = new QuickStartPage(this);

     // sets the wizard pages to the wizard, the order is based on the 
PAGEID struct
     setPage(GameWizard::ID_INTRO, gameIntroPage);
     setPage(GameWizard::ID_BALANCEBOARD, balanceBoardPage);
     setPage(GameWizard::ID_CONTROLLER, controllerPage);
     setPage(GameWizard::ID_PLAYER, playerPage);
     setPage(GameWizard::ID_TRAININGLEVEL, trainingLevelPage);
     setPage(GameWizard::ID_QUICKSTART, quickStartPage);

     // connects the signal of the training level page to the slot here
     connect(trainingLevelPage, SIGNAL(trainingLevelSkipped(void)), 
this, SLOT(skipTrainingLevel(void)));
}

Thanks
Dominic

Am 06.01.10 20:29, schrieb Irfan Omair:
> is this QDialog or are you using some QWizard?
> are you sure that you have put buttons in layout?
> can you give me code snipet.
>
> Regards,
> Irfan Omair
>
> On Wed, Jan 6, 2010 at 9:58 AM, Dominic Stalder 
> <dominic.stalder at bluewin.ch <mailto:dominic.stalder at bluewin.ch>> wrote:
>
>     Hi there
>
>     I attached a screenshot of a QDialog on Windows Vista, where the
>     buttons are some how hidden. Has someone ever had this problem?
>
>     Thanks and Regards
>     Dominic
>
>     _______________________________________________
>     Qt-interest mailing list
>     Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
>     http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100107/9d2e544b/attachment.html 


More information about the Qt-interest-old mailing list