[PyKDE] PyQt - getting unexpected async reply in threaded ap
Jim Bublitz
jbublitz at nwinternet.com
Sun Feb 23 18:35:01 GMT 2003
On 23-Feb-03 Nicholas John Murison wrote:
> As far as I can remember, somewhere in the PyQt it says there
> should be a global qApp variable. However, my code can't seem
> to find it, so I've passed on the object through constructor
> parameters to the threads.
> This seems to be working, and I hope it is the right way to go
> about these kind of things.
You should be able to access qApp if you just do:
from qt import qApp
or if you do (not the best form):
from qt import *
See for example application.py in the examples3/ subdirectory.
(Just as a side note: current versions of PyKDE don't implement the
equivalent kApp variable because it was causing a compilation
problem; PyKDE does implement the static
KApplication.kApplication()
which can be called from any module and will return the program's
KApplication instance)
Jim
More information about the PyQt
mailing list