PDA

View Full Version : "GUI" and "worker" threads



ale301168
10th October 2011, 11:05
Dear everybody,

I would like to submit a question about how I have decided to implement the GUI and worker threads in my
application. I'm working on Windows CE 5.0 and Qt 4.7.4. My problem is that the application is slow when
it has to render the GUI pages.

In the GUI thread I have created all of the GUI classes. Each class derives from a QFrame widget which
has been defined as top-level window. For each class which represents a page of my application I have
installed all the widgets needed from that page, reparented to the base QFrame. Also, each class has its
own worker thread which make some calculations and updates the GUI parts of its widgets.

So, I make GUI updates from some worker threads which call methods of widgets which live in the GUI
thread. Is the correct way to approach the GUI updating ? Is this the reason why I'm experiencing the
slowness when the application shows a new page ?

Best Regards

/Alessandro

wysota
10th October 2011, 22:10
Also, each class has its
own worker thread which make some calculations and updates the GUI parts of its widgets.
How is this implemented?