[PyQt] qwizard

pwnedd keith.hughitt at gmail.com
Fri Aug 21 14:02:57 BST 2009


Okay,

I think I have it figured out. I was a little unclear about how what was
actually being created when the QT Designer code was generated. I now
realize that the Ui_xx isn't what is actually extended QWizard, but rather
the class that instantiates Ui_xx. Since the pages are still instantiated in
the generated code, however, it's easier to simply extend the
QWizard-derived class's "initializePage", and then check to see which page
it is being called on:

class MyInstallWizard(QtGui.QWizard):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_InstallWizard()
        self.ui.setupUi(self)
        self.postSetup()
        self.initEvents()

    def postSetup(self):
        self.setPixmap(QtGui.QWizard.LogoPixmap,
QtGui.QPixmap(":/Logos/color.png"))
        
    def initializePage(self, i):
        print "Initializing page..." + str(i)

I think I'm slowly starting to get the hang of things :)

If anyone has any further suggestions, I would be very happy to hear them.

Thanks!
Keith
-- 
View this message in context: http://www.nabble.com/qwizard-tp19390520p25079399.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list