[PyKDE] Recent convert's comments

Markus Stenberg fingon at iki.fi
Mon Jan 8 07:19:20 GMT 2001


I first tried to get started with 2.2, then hoping for fix to (2) moved to
2.3pre1.. it didn't address the issue either, so here we go, my comments
about how PyQt works for me :)

[1] First of all, some (*) classes seem to be missing some methods. No big
deal, just required some SIP file twiddling to get the pyuic-converted UIs
working.

[2] PyQt (and SIP'd stuff in general) explodes _mysteriously_ if you try
to do multiple inheritance. I understand the reasons behind this, but at
least _I_ couldn't find any reference to it in PyQt documentation, and
only way I realized the limitation was by browsing SIP-generated source
code. 

I wish there was way to support it as well, but guess it's possible to
live without.. (although life's much more difficult - f.ex when
implementing custom QSlider-type widget, I wished I could've inherited
both QWidget and QRangeControl..)

[3] It works like charm! :-) I was pleasantly surprised how easy it was to
get started with PyQt once the two beforementioned hurdles were taken care
of. It took me only few hours to write GravityWars-clone.. (roughly 1k
lines of experimental code to get used to PyQt feel)

(http://www.iki.fi/fingon/trickshot?.gif [? == [123]],
 http://www.iki.fi/fingon/gw.tar.gz, ms.tar.gz)

It seems to be _much_ more fun than vanilla C++ Qt, and the speed is
sufficient (although not neccessarily blazingly fast, but that's Python to
you). Keep up the good work! ;-)

-Markus Stenberg

P.S.
 How is the exception handling done? I noted that my application did not
explode totally from exceptions, but instead it seems that each event?
performs it's own exception handling, and then resumes event loop on
exception. 

(*)
 At least QSlider (and some other class whose name I forget) lack some
of the QRangeControl-derived methods, such as setMinValue, setMaxValue and
setStepSize (not sure about the last one's name, but it's close..)






More information about the PyQt mailing list