Results 1 to 5 of 5

Thread: QWizard with QWizardPages gives blank pages?

  1. #1
    Join Date
    Feb 2008
    Posts
    77
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default 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?
    J-P Nurmi

  3. #3
    Join Date
    Feb 2008
    Posts
    77
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWizard with QWizardPages gives blank pages?

    Sorry, I don't understand what exactly you mean. I use this code to create a wizard:

    Qt Code:
    1. QWizard* carovnik=new QWizard();
    2. QCarovnikStran2* page2=new QCarovnikStran2();
    3. QCarovnikStran2* page3=new QCarovnikStran2();
    4. page2->setTitle("Page 2!");
    5. carovnik->addPage(page2);
    6. carovnik->addPage(page3);
    7. carovnik->exec();
    To copy to clipboard, switch view to plain text mode 

    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.
    Last edited by jpn; 3rd March 2008 at 15:27. Reason: missing [code] tags

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default 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.
    J-P Nurmi

  5. #5
    Join Date
    Feb 2008
    Posts
    77
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default 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!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.