[PyKDE] Unresponsive GUI

Giovanni Bajo rasky at develer.com
Wed Apr 6 14:58:40 BST 2005


Flávio Codeço Coelho <fccoelho at fiocruz.br> wrote:

> I am somewhat new to pyQT, and on my app, which is pretty cpu intensive,
the
> GUI becomes unresponsive while the python code is running.
>
> Is there a way around this? I thought the GUI would run as a C++ (QT)
thread
> independently of my python processes, but apparently this is not the case.
Or
> am I doing something wrong?
>
> appreciate any hints,


This is a generic Qt question, rather than a PyQt specific. If you perform
long taks in your application, you need to either do them in a different
thread, or poll Qt's event loop (in Python, you can do
qApp.processEvents()). If you can poll very often within your long task, the
GUI will be still responsive. Anyway, this is better answered on the
qt-interest mailing list.
-- 
Giovanni Bajo




More information about the PyQt mailing list