[PyKDE] PyKDE Widgets with pyuic

Torsten Marek shlomme at gmx.net
Fri Oct 8 10:13:59 BST 2004

Hash: SHA1

Herman Geldenhhuys schrieb:
| Hi.
| I have designed a ui file in Qt designer using KDE Widgets. After I
| compile the forms using pyuic and I run the generated script, I get
| errors telling me that my KDEWidgets are not defined globally:
| -------
| Traceback (most recent call last):
|  File "findbox.py", line 90, in ?
|    w = FindBox()
|  File "findbox.py", line 33, in __init__
|    self.kLineEdit1 = KLineEdit(self,"kLineEdit1")
| NameError: global name 'KLineEdit' is not defined
| -------
| When I look in the generated py file, I do not see anyplace where the
| KDE libs (kdeui etc) are imported. When I manually write an import
| statement, namely "from kdeui import *" and again run the generated
| python script, I always get a "segmentation fault" error.
| So, how do I make my PyKDE work with pyuic (Qt Designer)?
When do you get the segv? Can you do
|> import kdeui
in an interactive session? Otherwise there might be some problem with your
setup. Anyway, it's not too difficult to crash PyQt/KDE if you loose references
you'd better save, so if you can find out where the segv happens, you can post
the code here and ask for advice.

To the former problem: I'm not sure whether there's a official policy including
kde modules, but you can add
Python:from kdeui import *
into the comment field of the form settings dialog, this will add anything
following the : to your file.



- --
Torsten Marek <shlomme at gmx.net>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146  894C 7CC5 451E A244 C858
Keyserver: subkeys.pgp.net

Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


More information about the PyQt mailing list