I want to disable or hide Back button in QWizard dialog. How can I do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve looked at Qt’s sources and found out that it’s possible to hide Back button by creating custom button layout and ommiting Back button in the list:
I hope this will save some time to somebody.
P.S.
AFAIU to avoid using QTimer it is needed to modify QWizard source code. The easies way will be to add a virtual function
virtual void buttonsUpdated();
and call it from the end of QWizard’s:
void QWizardPrivate::_q_updateButtonStates()
Then reimplement this buttonsUpdated() in your QWizard sublass and disable Back button there.