[PyQt] Waiting on non-QT events.

Lev Shamardin shamardin at gmail.com
Tue Oct 7 07:23:10 BST 2008


On 10/06/2008 11:57 PM, Matt Smith wrote:
> > I have written an app for checking my email, and it laggs when I am
> > downloading from the server and I am curious how to avoid this.
> >
[...]
> >  I double click the MailBoxList it emits a signal that Email Widget is
> > connected to which then calls the ImapTool to query the imap server.
> > This stops everything, the lists freeze and I can't do anything until
> > the imap routine finishes.
> > Could this be avoided using more signals.  Like have the ImapTool as a
> > separate QObject that emits a signal when finish?.

Yes, if you start your ImapTool in a separate thread/process. I'm writing a
PyQt4 app with heavy networking and lots of slow queries to a remote server. All
queries are run in a separate from the GUI thread, and the GUI thread is
notified about the completion of queries with signals. The result is smooth UI
experience without much visible lags.

--
Lev.



More information about the PyQt mailing list