Results 1 to 6 of 6

Thread: QWizard noob question

  1. #1
    Join Date
    Aug 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QWizard noob question

    Hi all.

    I am making a wizard, and i want to use the last page to sum up all the information. But I cant get it to work.

    I use registerField() to "collect" the data, but I cant get the data from the field unless I override the accept() function. i.e I can only get the data when the user pushes the finished button...

    Some how I have to get all the user data without using the accept funktion.

    The idea is that the user should verify all inputed data on the last page, if there is a error the user should be able to pres the back button and correct the error.

    How can I do this?

  2. #2
    Join Date
    Feb 2008
    Posts
    98
    Thanks
    2
    Thanked 24 Times in 24 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWizard noob question

    You can use QWizard::field(). Connect currentIdChanged() to a slot where you check if the current page is the last one and then get the field values to validate them.

  3. #3
    Join Date
    Aug 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QWizard noob question

    How would you connect currentIdChanged() to a slot ? can you make a small example?

  4. #4
    Join Date
    Feb 2008
    Posts
    98
    Thanks
    2
    Thanked 24 Times in 24 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWizard noob question

    Are you subclassing QWizard or using it from another class?

    Qt Code:
    1. connect(m_wizard, SIGNAL(currentIdChanged(int)),
    2. this, SLOT(mySlot()));
    To copy to clipboard, switch view to plain text mode 

  5. The following user says thank you to victor.fernandez for this useful post:

    Ossi (2nd September 2009)

  6. #5
    Join Date
    Aug 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QWizard noob question

    Ahhh a noob mistake... I forgot the int in currentIdChanged(). Thanks! It works now.

  7. #6
    Join Date
    Aug 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QWizard noob question

    I found another solution. By reimplementing void QWizardPage::initializePage () [virtual], you can prepare the page before it is shown.

    http://doc.trolltech.com/4.5/qwizard...initializePage

Similar Threads

  1. QWizard and nextId() question
    By Splinter in forum Qt Programming
    Replies: 3
    Last Post: 25th February 2014, 10:35
  2. a simple noob question
    By wrproject in forum Newbie
    Replies: 1
    Last Post: 1st July 2008, 23:25
  3. QWizard, QComboBox and registerField() issue
    By RThaden in forum Qt Programming
    Replies: 1
    Last Post: 27th May 2008, 12:18
  4. Create QWizard UI
    By jd in forum Qt Tools
    Replies: 1
    Last Post: 17th March 2008, 12:36

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
  •  
Qt is a trademark of The Qt Company.