PDA

View Full Version : How to keep the main window activately



friday
14th January 2010, 16:07
Hi, all
My program has a main window and a progressBar in it to shown the progress.
The progressbar was connected with an thread object called A.
In main window, I call a subfunction in object A that read data from the hardware interface continuously ( in a loop).
In object A, after read the data, it emits a signal with the reading data.
In main window, the slot function get this signal and data, display on progressbar.
The problem is that during it running, when I click outside the main window (the main window becomes deactivate), the progressbar was stopped until the call function was finished (after reading all data).
I use QT4.5, in debugging environment, the program works well. But without debugger mode, it always stick until the end of calling.

Does any one has any idea for it?

I have tried several ways but can't deal it. It seems the signal was emit but stopped at somewhere or because of the main window deactivate? And I have use DirectConnection option, doesn't work.
I try to keep main window activate, such as set up window state through a timer, does't work too.
please help

faldzip
14th January 2010, 19:04
read this (http://doc.trolltech.com/qq/qq27-responsive-guis.html).

friday
15th January 2010, 10:43
quit useful article
thanks a lot