[PyQt] help

David Boddie dboddie at trolltech.com
Wed Sep 2 11:43:53 BST 2009


On Wed Sep 2 01:42:39 BST 2009, M.J. Bell wrote:

> I believe that PyQt3 is not available for windows (is that right?)

Not under a Free license, no.

> and so I am trying to port the code to PyQt4. I have changed the library
> names to reflect the different structure, but now I am getting the
> following message:
>
> Traceback (most recent call last):
>   File "C:\Python26\Lib\site-packages\Perception\perception.py", line 250,
> in <module>
>     Participants = myParticipantData ()
>   File "C:\Python26\Lib\site-packages\Perception\participant_data_ui.py",
> line 19, in __init__
>     QtGui.QDialog.__init__(self, parent, name, modal, fl)
> TypeError: argument 2 of PyQt4.QtGui.QDialog() has an invalid type

The release of Qt 4 substantially revised the APIs of many classes, so there
are some changes to be made. Here, you need to discard pretty much everything
after the parent argument.

Good luck with your porting!

David


More information about the PyQt mailing list