PDA

View Full Version : [PyQT] QProgressDialog can't update during heavy work



3str
13th July 2011, 12:21
Hi, I'm using PyQT with Python 3.2. My program is going to read a lot of files(300+) in a directory and analyze them. This process may take several minutes. During the process, the GUI interface is completed frozen. I tried to add a progress indictor using QProgressDialog to show how many file have been processed. But the QProgressDialog can only show up and freeze again, until the whole reading process is over.

I tried to use a separate thread or process to run the file processing work, but it won't help. The QProgressDialog window is still freezing......

Would anyone give me a hint on how to do this? Thanks!

stampede
13th July 2011, 12:35
Read this article : Keeping the GUI Responsive (http://www.qtcentre.org/wiki/index.php?title=Keeping_the_GUI_Responsive)