开发者

Customize the buttons in a QWIzard?

开发者 https://www.devze.com 2023-01-09 07:53 出处:网络
QWizard have some options related to the buttons as follows: NoDefaultButton NoBackButtonOnStartPage NoBackButtonOnLastPa开发者_JAVA百科ge

QWizard have some options related to the buttons as follows:

    NoDefaultButton
    NoBackButtonOnStartPage
    NoBackButtonOnLastPa开发者_JAVA百科ge
    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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消