QWizard with QWizardPages gives blank pages?
As title states I use QWizard and add some QWizardPages with addPage. However when I run the program all pages are blank. I can click Next in the wizard but there is just a blank white space inside the wizard. What am I doing wrong? I have some buttons and test widgets inside QWizardPage instances that were built with Designer.
Re: QWizard with QWizardPages gives blank pages?
Did you install a top level layout for the pages? Do child widgets get resized if you resize the page in designer?
Re: QWizard with QWizardPages gives blank pages?
Sorry, I don't understand what exactly you mean. I use this code to create a wizard:
Code:
QWizard* carovnik=new QWizard();
QCarovnikStran2* page2=new QCarovnikStran2();
QCarovnikStran2* page3=new QCarovnikStran2();
page2->setTitle("Page 2!");
carovnik->addPage(page2);
carovnik->addPage(page3);
carovnik->exec();
QCarovnikStran2 is a GUI class, created with Designer. When I open a wizard, I see a title ("Page 2!"), but no buttons and other widgets that are defined in QCarovnikStran2.
Re: QWizard with QWizardPages gives blank pages?
The form you have created in Qt Designer, does it have a top level layout installed? See this screenshot.
Re: QWizard with QWizardPages gives blank pages?
Thank you very much for a hint. I had some layout present, but obviously it was not top-level and I did not know that it is needed for wizard to work. Thank you again!