[PyKDE] Re: PyKDE Digest, Vol 32, Issue 11

Tony Cappellini cappy2112 at gmail.com
Tue Mar 6 16:24:51 GMT 2007


ate: Tue, 6 Mar 2007 01:08:26 +0100
From: Andreas Pakulat <apaku at gmx.de>
Subject: Re: [PyKDE] QThread run() method not being called when
       start() is      executed (PyQt4/ Windows XP)
To: pykde at mats.imk.fraunhofer.de
Message-ID: <20070306000826.GA28275 at morpheus.apaku.dnsalias.org>
Content-Type: text/plain; charset=us-ascii

>  def flush(self):
>    self.emit(SIGNAL('write'), self.str)
>    self.str = ''
[...]
>>Well, of course not because nothing in your code calls flush and thus
>>the emitting of the write signal is never done. Also I'm not sure wether
>>its a good idea to have a signal and a function with the same name in
>>the ConvertThread class.

My GUI code is derived from another GUI which uses the exact same
ConvertThread class . The other gui works with the flush call.

After stripping it down to the bare minimum as Phil had suggested, I
found out that run is being called in my GUI, but the target app
wasn't being executed because of a typo in the code which calls it. I
had entered the typo.
It doesn't seem as though the flush() call is affecting anything,
since my GUI can now launch the target app and pas it arguments.

However, the appearance of the flush() call is confusing, because it
is not listed under the inherited functions for QThread, nor is is
listed as belonging to the QThread class under the index listing by
function name.

This must just be an omission in QtAssistant.




More information about the PyQt mailing list