Results 1 to 5 of 5

Thread: Modifying a QWizard

  1. #1
    Join Date
    Oct 2015
    Posts
    3
    Qt products
    Qt5

    Default Modifying a QWizard

    Hello all

    I have an issue where I am tasked to modify an existing QWizard application.

    Bascially there was a wizard with 6 pages. I wanted to remove the last 3.

    There is a main QWizard class where there are pages variables being declared in the constructor, which I didn't remove because many methods depend on those variabls

    However, there is also an addPage method being called in the constructor which takes each page variable.
    I removed the addPaeg call for the pages I didn't want.

    I also went to the 3rd page class, and added an isComplete method, a setComplete method, and removed the nextId method.

    Now when I run the wizard, I only see 3 pages. However, the third page does not have a finish button.

    I can't figure out why.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Modifying a QWizard

    Does your setComplete() method emit the completeChanged() signal?

    Cheers,
    _

  3. #3
    Join Date
    Oct 2015
    Posts
    3
    Qt products
    Qt5

    Default Re: Modifying a QWizard

    Yes it does.

    I feel that the pages are not being removed even though i got rid of the addPage calls.
    Considering the page says next still.

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Modifying a QWizard

    The nextId() function you removed needs to exist and return -1 if the wizard thinks there is a next page (which it may do at the moment)

  5. #5
    Join Date
    Oct 2015
    Posts
    3
    Qt products
    Qt5

    Default Re: Modifying a QWizard

    Thanks, that took me to the last page. Although the finish button isn't functional.

    It seems like some pages I skip are doing backend functionality stuff, so I need another workaround.

    Is there a way to "fake" a wizard page where you do not show it, but you still do all the processing that it would do upon clicking next?

    So I'd originally have pg 1,2,3,4,5,6 where 1 is the beginning and 6 is the end.

    1,2 are shown and upon clicking next, it just executes 4,5 too without showing it. Then just 6 shows and you click finish.

Similar Threads

  1. Modifying QStandardItemModel from non-UI QThread?
    By m3rlinez in forum Qt Programming
    Replies: 3
    Last Post: 11th December 2010, 17:02
  2. Modifying file with Qt
    By afail in forum Qt Programming
    Replies: 1
    Last Post: 14th December 2009, 14:34
  3. Modifying a text
    By jaca in forum Qt Programming
    Replies: 3
    Last Post: 6th May 2008, 15:50
  4. Modifying a line in a QTextEdit
    By elcuco in forum Qt Programming
    Replies: 1
    Last Post: 15th March 2008, 16:50
  5. Modifying the Display on Device
    By mahe2310 in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 13th April 2006, 04:36

Tags for this Thread

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.