[PyKDE] porting qtdemo example

Andreas Pakulat apaku at gmx.de
Tue Jan 17 00:00:11 GMT 2006


On 15.01.06 01:24:26, Andreas Pakulat wrote:
> Hi,
> 
> I'm currently porting the qtdemo example, so far the code has no or
> (hopefully) only little obvious errors. The whole drawing-stuff does not
> yet work but I have to work my way through the different classes to get
> that fixed.

Ok, here's a short update on the progress just so all know:

The porting is done, that means qtdemo written in python can now launch
the C++ examples installed with Qt4.1. The next step I'll take is making
qtdemo start the python examples which should be found via traversion
from current dir 2 dirs up and then "looking" around. There are some
minor issues wrt the backgrounds of items, the font sizes and that
there's a "copy" of the examples list floating by when starting the app.

If somebody here has a more pythonic way of executing the scripts than
through QProcess, which also enables to notify the qtdemo program when
the started script finished, a short private example would be great so I
can be more pythonic. If all here think it's better to stick with
QProcess I'm fine with that too.

Oh and the last thing: I'll also remove all the extra dicts/lists that
currently are in the Launcher class and make that a list of
category-dicts, where each dict has an item that itself is a list of
example-dicts. I think this is more pythonic and the original qtdemo
example was changed in a similar way for qt4.1.1 (thanks to David Boddie
for pointing me at the snapshots).

I'll attach the current version so anybody who wants to can try it out.
One thing to notice is that it's slow, but not so much slower than
the compiled version, which is a plus for python and PyQt4 I think ;-)

Andreas

-- 
Stay the curse.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtdemo.tar.gz
Type: application/x-tar-gz
Size: 35028 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20060117/b572d21c/qtdemo.tar.bin


More information about the PyQt mailing list