Alin
Alin

Reputation: 25

How to disable the back button for all pages of QWizard?

I want to disable all back buttons from my application. I found a solution only for the first and last page, but I can't disable it for all the pages.

self.setOption(QWizard.NoBackButtonOnStartPage)
self.setOption(QWizard.NoBackButtonOnLastPage)
                    or
self.setOption(QWizard.DisabledBackButtonOnLastPage)

Does anyone have a solution?

Upvotes: 1

Views: 150

Answers (1)

eyllanesc
eyllanesc

Reputation: 243955

You can set a new button layout without BackButton using setButtonLayout():

self.setButtonLayout(
    [
        QWizard.Stretch,
        QWizard.NextButton,
        QWizard.FinishButton,
        QWizard.CancelButton,
    ]
)

Upvotes: 1

Related Questions