[PyKDE] Closing dialogue windows
Tom Chance
tomchance at gmx.net
Thu Feb 27 16:52:00 GMT 2003
Related to this, how do you close a dialogue window when it is running in a
new thread? And how do you keep updating it?
I've started my dialogue window like so (where ProgressDialogue is a class
made in Qt Designer):
progresswin = ProgressDialogue(self, "Progress", 1, Qt.WType_Dialog)
thread.start_new(progresswin.exec_loop, ())
This allows me to continue working in the main thread and passing info to and
from the progress window thread. But if I connect a close button to the
close() slot, it closes the whole app, including the main window. How do I
get around this?
I also get a strange behaviour whereby once the window has "finished"
(progress is complete), if I put one window over the progress window, then
bring back the progress window, its contents get blanked out, so it isn't
updating the display. I put app.processEvents() at the end of the bit of code
for the work it's doing, but it has no effect. I'm guessing this alsohas
something to do with the threading?
Thanks for any help,
Tom
On Thursday 27 February 2003 12:08 am, Konrad Hinsen wrote:
> How can I open a second window from within a PyQt application? If I
> understand the Qt doc correctly, I need to pass the flag WStyle_Dialog, but
> this doesn't seem to be defined in PyQt.
>
> Konrad.
More information about the PyQt
mailing list