[PyKDE] How to use kURLRequester
Jim Bublitz
jbublitz at nwinternet.com
Tue Apr 18 17:03:45 BST 2006
On Tuesday 18 April 2006 00:22, Alvaro Arenas wrote:
> Hi.
>
> I am trying to use the kURLRequester widget (this comes with the
> qt-designer) but this widget is not recognised. I guess I should add
> some include line like import kde. But I wonder why qt-dessigner
> doesn't add the code by itself. By the way I am using this because I
> want to open a dialog requesting for the path to a directory.
>
> I know this is a very basic question but I haven't found an
> appropriate tutorial for pyqt (pykde)
>
> Thanks
>
> Alvaro
>
> PD: Here is the error:
>
>
> aarenas at anupolar:~/Projects/qtProject2$ python myFirstApp.py
> Traceback (most recent call last):
> File "myFirstApp.py", line 7, in ?
> f = CustomForm1()
> File "/home/aarenas/Projects/qtProject2/customForm1.py", line 7, in
> __init__ Form1.__init__(self)
> File "/home/aarenas/Projects/qtProject2/form1.py", line 53, in __init__
> self.kURLRequester1 = KURLRequester(self,"kURLRequester1")
> NameError: global name 'KURLRequester' is not defined
The KURLRequester class is in the kfile module - it looks like you're not
importing kfile.
If you're using pyuic or kdepyuic to generate Python code, you'll probably
need to add an 'import kfile' manually.
Jim
More information about the PyQt
mailing list