Hi!
I am working in Qt 4.3 and have created four pages. In the second page, it has a start pushbutton which is used to calibrate cards. I want to make the start pushbutton enabled and the Qwizard NextButton disabled when initialized. To do this I tried to disable the button in the initializePage() or QWizard’s nextId() funtion, but both do not work.
In Qwizard::nextId():
button(Qwizard::NextButton)->setEnabled(false);
button(Qwizard::NextButton)->setEnabled(false);
To copy to clipboard, switch view to plain text mode
In QwizardPage::initializePage():
QabstractButton *btn = parentHandle->button(Qwizard::NextButton);
Btn->setEnabled(false);
QabstractButton *btn = parentHandle->button(Qwizard::NextButton);
Btn->setEnabled(false);
To copy to clipboard, switch view to plain text mode
After I called wizard->show(), I do the following:
wizard->button(Qwizard::NextButton)->setEnabled(false);
wizard->button(Qwizard::NextButton)->setEnabled(false);
To copy to clipboard, switch view to plain text mode
This can disable the QWizard’s NextButton, but if I call it before wizard->show(), it does not work.
If I connect the start pushbutton click signal to a slot, which is to disable the Qwizard’s NextButton, when I click the button it can disable the QWizard’s NextButton. However, I don’t want it to be disabled when I click the button, only when it is initialized.
Any suggestion will be greatly appreciate!
Bookmarks