I have a QWizardPage
where user is supposed to go through certain steps, at the end of which there is a button "Test". If user presses that button, two things happen:
"Next" button gets enabled in order to go to the next page of the
QWizard
. This is achieved by emitting a button's special signal which is connected toQWizardPage
:this->registerField("test*", m_button, "text", SIGNAL(testDone()));
m_button
is derived from QPushButton
with a custom signal testDone()
.
- Button name is changed to "Try again" in order to offer an option to try the series of steps all over again. If user presses the button, the GUI elements return to the initial state (except disabling the button "Next" on
QWizard
).
The question is: for the second scenario, how do I make sure the "Next" button gets disabled after being enabled by the emitted testDone()
signal?
I thought if I disconnect the particular signal testDone()
from QwizardPage
(after it is emitted), it would give the desired results, however, it did not work. I tried to disconnect everything on the QWizardPage
(e.g. this->disconnect
), but that also didn't work. Any other ideas?