Question

QWizard have some options related to the buttons as follows:

    NoDefaultButton
    NoBackButtonOnStartPage
    NoBackButtonOnLastPage
    DisabledBackButtonOnLastPage
    HaveNextButtonOnLastPage
    HaveFinishButtonOnEarlyPages
    NoCancelButton
    CancelButtonOnLeft
    HaveHelpButton
    HelpButtonOnRight

Now these options are not enough to me, is there any way to do the customization??

For example, after setting a QWizardPage as a final page, the "next" button is still there since the page originally have next page.

What I want is to change "next" to "finish" instead of one more "finish" button.

Another example is that at the first page, I want the "back" button shows up but is disabled.

How can I control these buttons in a more flexible way? I want make some buttons disappear and some be disabled.

Was it helpful?

Solution

If you call the follwing function:

QAbstractButton * QWizard::button ( WizardButton which ) const

with following argument:

QWizard::NextButton

then you should get a pointer to the "Next" button.

The only thing left to do is to call setVisible(bool) function of the button when you are one the last but one (pre-last) page?

I have never done this, just tried to help you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top