Results 1 to 3 of 3

Thread: Writting Simple exam engine using Trivial Wizard Example

  1. #1
    Join Date
    May 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Writting Simple exam engine using Trivial Wizard Example

    Hi

    I am newbie in Qt programming and trying to write a simple exam engine using
    Trivial Wizard Example. All is working fine unless the QRadioButton::isChecked
    won't work at QWizardPage. I have tried to turn Exclusivity to on and off and
    checked all radio buttons off as well in QWizardPage but that didn't help.

    I think I should change the isChecked status after adding QWizardPages to QWizard
    and in main function but don't know how.

    Could some please check the attached source code and let me know where I am doing wrong
    or where and how should I check the QRadioButton status ?

    ofcource if I place setChecked at QWizardPage level , it works, but now when I click
    on QRadioButton.

    Thanks for help
    Attached Files Attached Files

  2. #2
    Join Date
    May 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Writting Simple exam engine using Trivial Wizard Example

    Ok, QRadioButton's status should be checked when Next button is clicked
    and I was checking the status when the QWizardPage was added to the QWizard.

    now , how can we override the QWizard's next button to check the
    QRadio button status of each page ? and if we can not over ride the
    Next button , then we should be able to connect each next button
    to a QWizardpage and it's QRadioButton's field , and I came up
    with some thing like:

    wizard.button(QWizard::NextButton)->connect(wizard.button(QWizard::NextButton), SIGNAL(clicked()), wizard.currentPage()->field(QRadioButton) ,SLOT(wizard.currentPage()->?));

    but still don't know if I can use QRadioButton in field ,and what should I use beside of ? mark.

    Thanks for help.

  3. #3
    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: Writting Simple exam engine using Trivial Wizard Example

    When do you want to check that the correct answer has been checked? Can the user progress if they have the wrong answer or will they be blocked? Is the idea that you simply collect their response for each page and tally up the correct responses when they "Finish" the wizard?

    You should look at how the QWizardPages are constructed in the Class Wizard Example because you could learn more from that than the trivial example.

Similar Threads

  1. Replies: 1
    Last Post: 29th September 2011, 11:14
  2. Problems writting a svg file
    By Hogwarts in forum Qt Programming
    Replies: 2
    Last Post: 7th July 2011, 15:38
  3. About preperation for Qt Essentials exam
    By cOdE_rEd in forum Qt Programming
    Replies: 7
    Last Post: 20th January 2011, 07:04
  4. 3D engine to create simple 3D objects
    By been_1990 in forum General Discussion
    Replies: 11
    Last Post: 15th December 2010, 11:57
  5. [QT4] Trivial question(s)
    By agent007se in forum Newbie
    Replies: 1
    Last Post: 27th June 2006, 14:59

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.