[PyQt] how to import pykde ?

Feth AREZKI feth at arezki.net
Thu Sep 4 15:29:55 BST 2008


Hello world,

I got a (beginner?) problem initializing some objects, for instance of the 
class KAboutData:
  *works:
     from kdecore import KAboutData 
     (how to be sure of the kdecore version used? I suspect it's from kde 3,
     help(KAboutData) is not explicit) 
  *does not work, although is favoured by documentation [0]:
     from PyKDE4.kdecore import KAboutData'.
     (help(KAboutData) refers to kde4 classes)

However, it seems I cannot use both kinds of imports in the same program (both 
wrap the QObject class...).

So, should I use only the first kind of import ? Will it work ?

I join a small test generating errors on a debian and an ubuntu:
% python test.py pykde4
->
debian sid/experimental on sept 4th 2008 :
TypeError: argument 1 of KAboutData() has an invalid type
  Python             2.5.2
  python-kde4        4.0.2-1-1
  python-sip4        4.7.7-1
TypeError: argument 3 of KAboutData() has an invalid type
  kubuntu 8.4
  Python             2.5.2
  python-kde4        4:4.0.3-0ubuntu1.2
  python-sip4        4.7.3-1ubuntu2

Thank you for clues !


[0] http://www.riverbankcomputing.co.uk/static/Docs/PyKDE4/using.html

-- 
Feth

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 1160 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080904/eefdd363/test.py


More information about the PyQt mailing list