[Qt-interest] QtConcurrent and QFutureWatcher
Marius Roets
roets.marius at gmail.com
Thu Sep 23 14:35:32 CEST 2010
Hi Everybody,
I have this piece of code in a widget, when a button is pressed:
MyObject m;
QFutureWatcher<void> futureWatcher;
connect(&futureWatcher, SIGNAL(finished()), this,
SLOT(longExecuteCompleted()));
futureWatcher.setFuture(QtConcurrent::run(m, &MyObject::longExecute));
It seems to work as expected, except that longExecuteCompleted() never gets
called, and I can see from the log files that longExecute() did complete. Is
there anything I could missing in MyObject, longExecute() or futureWatcher
for this to work.
Thanks
Marius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100923/8613fbde/attachment.html
More information about the Qt-interest-old
mailing list