Results 1 to 5 of 5

Thread: Non-typical and Non-linear wizard

  1. #1
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Non-typical and Non-linear wizard

    I am developing an application which uses a wizard to add new item into the database
    every step (page) is checked for errors such as
    - vital input field is empty
    - some internal condition are not true

    the problem I am facing here looks like
    - the first welcome page has an id equal to 0, and any next page has an id incremented by 1
    - loading the wizard is always successful
    - however the condition which should be checked when user tries to leave page id=1 is in fact being checked when entering page id=1 (when leaving welcome page)

    it means that every conditon which shuld be checked when leaving is checked when entering the page

    hope that is explained clearly

    I am looking for the solution to solve this bug but I do not have any working one still.
    I tried additional variable and so on...

    BTW, to control flow of wizard I reimplemented nextID() method
    and below I present some useful debug info which I obtained after opening the wizard.
    "Wizard constructing"
    0
    0
    It is weird for me that nextID() method had been called twice after wizard was loaded, as
    "Wizard constructing" statement is produced by qDebug at the end of the constructor as control output for me
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

  2. #2
    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: Non-typical and Non-linear wizard

    - however the condition which should be checked when user tries to leave page id=1 is in fact being checked when entering page id=1 (when leaving welcome page)
    Where and how have you coded these checks? It could be in QWizard::validateCurrentPage(), QWizardPage::validatePage(), or QWizardPage::isComplete() but it sounds like you might be trying to do it in in QWizard::nextId() or QWizardPage::nextId().

    Edit: I had the method names a bit wrong.
    Last edited by ChrisW67; 29th December 2010 at 22:56. Reason: Fixed method names

  3. The following user says thank you to ChrisW67 for this useful post:

    kornicameister (29th December 2010)

  4. #3
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: Non-typical and Non-linear wizard

    Nice guess actually
    there is an another time when doing certain things on fly increase amount of work very... very and so on to infitity
    Yeah, you right about what I am trying to do, that's only because I'd not read the docs too carefully and failed to find these info (if there are included there)
    I assume this functions to be virtual, so I will make sure about and reimplement it

    for now thansk for pointing me to the right direction ;-)


    ehmm... but I do not use QWizardPage separately, I created the whole wizard via QtCreator
    but perhaps there is a smart way to perform such checks as You suggested
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

  5. #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: Non-typical and Non-linear wizard

    All of the methods I mentioned are in the QWizard or QWizardPage docs in Assistant. (I have corrected one of the names above).

    You can use Designer/Qt Creator to create QWizardPage classes and then use the promotion feature to put them into your QWizard.

  6. #5
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: Non-typical and Non-linear wizard

    And everythings worked just fine
    thank You for Your help

    so I assume than that my wizard is not so untypical as I'd thought :-)))))) what a shame
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

Similar Threads

  1. Drawing a line with a linear gradient effect
    By toutarrive in forum Qt Programming
    Replies: 4
    Last Post: 15th February 2010, 07:42
  2. To Wizard or Not ?
    By fassage in forum Qt Programming
    Replies: 1
    Last Post: 6th November 2009, 10:42
  3. QprogressBar Style Sheets: double linear gradient
    By Beppe in forum Qt Programming
    Replies: 6
    Last Post: 8th May 2009, 14:41
  4. How to add a Wizard ?
    By npc in forum Qt Tools
    Replies: 4
    Last Post: 24th July 2007, 14:28
  5. multiple page linear interface
    By ahkv9 in forum Qt Programming
    Replies: 3
    Last Post: 17th April 2007, 19:44

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.