[PyQt] Documentation error (report)

zw g pekingmaster at gmail.com
Mon Jan 21 09:15:49 GMT 2013


Dear Guys,

Recently i was learning how to combine the python code and the generated
code from Qt Designer.

>From the following page, my friend Jimmy Kuu points out there are errors
inside the demo code, more specificly(see the red fonts below):

http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/designer.html
Using the Generated Code=================

The third example shows the multiple inheritance approach:

from PyQt4.QtGui import QDialogfrom ui_imagedialog import Ui_ImageDialog
class ImageDialog(QDialog, Ui_ImageDialog):
    def __init__(self):
        QDialog.__init__(self)

        # Set up the user interface from Designer.
        self.setupUi(self)

        # Make some local modifications.
        self.colorDepthCombo.addItem("2 colors (1 bit per pixel)")
        # Connect up the buttons.
        self.ui.okButton.clicked.connect(self.accept)
        self.ui.cancelButton.clicked.connect(self.reject)


=================

After verification, we think:
*self.ui.okButton* should be* self.okButton*,  and the same to
self.ui.cancelButton.

Hope someone fix this issue.
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130121/89012430/attachment.html>


More information about the PyQt mailing list