[PyKDE] Basic question about custom slot/function

Torsten Marek shlomme at gmx.net
Sun Jun 19 08:31:09 BST 2005

Hash: SHA1

Kevin Walzer schrieb:
> Hello,
> I'm working on my first PyQt application, and to get a feel for signals
> and slots, I'm trying to have my application echo the text entered into
> a line edit widget to stdout. However, when I test this, what is printed
> is "Not implemented yet," which tells me I'm doing something wrong.
> Here is my ui.h code:
> void form1::LaunchFoo()
> {
> ~  # get the text typed in the line edit
> ~  e = self.lineEdit1.text().ascii()
> ~   #show output
> ~    os.system('echo %s', e)
> ~    }
> I've also tried the simple statement "print %s, e", but I also get the
> "not implemented yet" error.
> Can anyone help point me in the right direction?

Hi Kevin,

does the file generated by pyuic contain the code from LaunchFoo? Normally,
pyuic also prints out messages to the command line, if it imports function code.
Did you connect the signal "textChanged(const QString&)" to the slot LaunchFoo?
It seems unlikely to me, because LaunchFoo() has the wrong signature.

Maybe you might want to have a look at one of the tutorials listed in the wiki,
and also the tutorial of Qt Designer.



- --
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.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


More information about the PyQt mailing list