[Qt-interest] Problem drawning in the GUI Thread with Data from another Thread
O Caldas
caldaz.sheep at gmail.com
Thu Jul 2 07:27:05 CEST 2009
Hi, im working on a project where I have two threads, one Worker thread,
that do some calculations,
and one GUI Thread, that draw some graphics in a QWidget.
The Worker thread is a class that inherits from QThread, and the GUI Thread
is the main thread obviously.
Im geting the worker thread to send a signal every end of calculation step,
and connecting this signal
to the method that draws the graphic in the GUI Thread
like this:
connect(calculator, SIGNAL(calculated(),this,
SLOT(updateView()));
The problem is, when the calculation gets to fast, the GUI thread just bugs
and the program terminates.
It seems that the calculator thread starts sending too much signals and the
GUI thread cant handle it,
or something like this.
i've tryed to use Qt::BlockingQueuedConnection but it is too slow.
if someone knows what im doing wrong, or the right way to build a program
like that please help!
i would be very gratefull!
--
cheers
Daniel Mendes Caldas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090702/253e355e/attachment.html
More information about the Qt-interest-old
mailing list