Hi,
A friend of mine just gave me this code.
Maybe you can use for your wizard?
import sys
from PySide import QtGui
app = QtGui.QApplication(sys.argv)
class MyWizard(QtGui.QWizard):
def __init__(self, parent):
QtGui.QWizard.__init__(self, parent)
buttons_layout = []
buttons_layout.append(QtGui.QWizard.HelpButton)
buttons_layout.append(QtGui.QWizard.Stretch )
buttons_layout.append(QtGui.QWizard.CancelButton )
buttons_layout.append(QtGui.QWizard.NextButton )
buttons_layout.append(QtGui.QWizard.FinishButton)
self.setButtonLayout(buttons_layout)
page1 = QtGui.QWizardPage()
page2 = QtGui.QWizardPage()
wiz = MyWizard(None)
wiz.addPage(page1)
wiz.addPage(page2)
wiz.show()
app.exec_()
Hope it helps!
ASO
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Simon Leung
Sent: mercredi 5 janvier 2011 14:25
To: Lauro Moura
Cc: [email protected]
Subject: Re: [PySide] disable back button in wizard page
On 05/01/11 13:11, Lauro Moura wrote:
> On Wed, Jan 5, 2011 at 7:20 AM, Simon Leung<[email protected]> wrote:
>> Hi all,
>>
>> Hopefully a simple question: I have a wizard with several pages: how can
>> disable the "Back" button on every page?
>>
> Try QWizardPage.setCommitPage(bool)
>
> From docs: "A commit page is a page that represents an action which
> cannot be undone by clicking Back or Cancel. A Commit button replaces
> the Next button on a commit page."
>
>
Thanks for the reply. But I'd like to keep the Next and Cancel button
and only remove the Back button.
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside