PDA

View Full Version : Disabling the buttons in QWizard



divya balachandran
10th October 2008, 10:41
iam using the QT4 version...


Here my question is how to disable the buttons in intermediate PAges of a QWizard???

yuriry
10th October 2008, 17:54
have you tried calling QWizard::button(WizardButton which) and then
button->setEnabled(false)?

jpn
11th October 2008, 19:49
Please read the detailed description of QWizardPage docs. QWizardPage provides five virtual functions that can be reimplemented to provide custom behavior.

divya balachandran
13th October 2008, 14:36
have you tried calling QWizard::button(WizardButton which) and then
button->setEnabled(false)?


ya i tried this, but that results in error that the button cannot be used as a function...
then the code you sent will work only in Q3Wizard and not in Qt4

ioannis
13th October 2008, 15:48
Use QWizardPage::isComplete()

Lesiok
13th October 2008, 19:11
Ie to disable CustomButton1 :

wizard()->setOption(QWizard::HaveCustomButton1, false);

mummy
13th October 2008, 23:46
hey,

in Qt4 there are some methods to handle the standard buttons of QWizard.

setCommitPage( true) - disables Back button
setFinalPage(true) - shows Finish Button, not Next, if isComplete returns true

implement isComplete() - to disable/enable Next or Finish Button
reimplement isFinalPage() - to show Finish Button

Read docs to do more fine things :confused:

Bye