Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWizardPage nextId() strange behaviour
Forum Updated to NodeBB v4.3 + New Features

QWizardPage nextId() strange behaviour

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cyianor
    wrote on last edited by
    #1

    Hey!

    I am working with Qt 4.6.3 and writing an application which includes an import wizard. I am using QWizard for this and so far it works great. I've come to experience something strange though. On the page before the last page I want the user to be able to chose if he wants to skip the last page or not. So after reading the docs I reimplemented nextId() for the QWizardPage on which the user can chose.

    It is basically like this:

    @
    int DutyPage::nextId() const
    {
    if(skipCheckBox->isChecked()) {
    return -1;
    } else {
    return ImportWizard::ImportDuty_Page;
    }
    }
    @

    So if I come to this page and want to go on everything works great. But if I am on the page and checking the skipCheckBox the Wizard doesn't continue when clicking on Next but it doesn't quit either. Isn't returning -1 the appropiate way to end the wizard? Since I am not reseting the checkbox when restarting the wizard it's still checked when reopening the wizard. This time it works perfectly to close the Wizard but I can't continue to the last page even if I uncheck the checkbox.

    Did anybody encounter a similar problem or did I do something wrong in the nextId() function?

    Greetings,
    Cyianor

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved