QWizardPage nextId() strange behaviour



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.