[PyKDE] PyQt4 Update
phil at riverbankcomputing.co.uk
Thu Dec 1 22:34:41 GMT 2005
Tonight's PyQt4 snapshot has the QtGui module 99% complete. This means PyQt4
is now officially useful, but note the following...
- untested on Windows
- untested against Qt v4.1
- untested against GCC v4
The Qt tutorials have been ported to Python as has the application.py example.
A really useful thing for people to do now would be to port as many of the
other Qt examples as possible and send them to me for inclusion. Please
follow the coding style I've used.
Expect to see seg faults - it's unlikely(!) I've got all the ownership issues
correct at the first attempt.
Always use the latest SIP snapshot. If you want to use PyQt4 and PyQt3 side by
side then you will also need to use a PyQt3 snapshot. Otherwise you'll be
better off installing another Python instance dedicated to PyQt4.
There are a couple of differences between PyQt3 and PyQt4 that will catch
- Whenever a method name clashes with a Python keyword then I have simply
appended "_" to the name. For example exec() became exec_loop() in PyQt3 but
becomes exec_() in PyQt4.
- emit() used to take 2 arguments - a signal name and a tuple of arguments
passed to the slot. In PyQt4 it takes a variable number of arguments, the
first being the signal name and any remaining arguments are passed to the
More information about the PyQt