[PyKDE] porting qtdemo example

Andreas Pakulat apaku at gmx.de
Sun Jan 15 00:24:26 GMT 2006


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.

However, there are some things I'd like to discuss here, as the version
that is running now only shows the Qt4 examples (i.e. the C++ versions).

qtdemo reads 2 xml files, one for the demos, one for the examples
containing all important information (categories, example names,
example directory name) and checks wether the examples can be found. The
first question that arises here: Is there a way in PyQt4 to get the path
were the examples lie around, other than using qtdemo's path and going
up 2 directories? Phil are there any plans to "install" the examples,
like into $PYTHONDIR/share/PyQt4/examples?

Next question is: Will the demos get ported? Until now I can only see
work is done on the examples dir, but I think the demos are also GPL and
can thus also be ported.

The next "problem" is documentation and images. The qtdemo shows the
information from the Qt docs about the examples/demos including
screenshots when they're available. As far as I can see PyQt4 doesn't
provide any documentation and PyQt3 also didn't, so I guess I should
just use the (hopefully already installed) Qt documentation?

And the last thing is: Execution of the examples/demos. The C++ qtdemo
just looks for a executable file in 

<category>/<example>

which of course doesn't work with PyQt4. One problem here is, that some
examples do have their own directory, while others don't. I think the
best way to approach this is to extend the existing xml files and add an
executableScript and a hasDir-flag attribute. Any better ideas?

Andreas

-- 
You'll be called to a post requiring ability in handling groups of people.




More information about the PyQt mailing list