[Qt-interest] QtConcurrent::run() and updating progress bar
Marius Roets
roets.marius at gmail.com
Sun Sep 26 17:44:23 CEST 2010
Hi everybody,
I'm using QtConcurrent::run to call a method from MyClass like :
MyClass m;
QFutureWatcher *futureWatcher = new QFutureWatcher<void>;
connect(futureWatcher, SIGNAL(finished()), this, SLOT(queriesFinished()));
connect(&m, SIGNAL(runningQuery(const QString&)), this,
SLOT(runningQuery(const QString&)));
futureWatcher->setFuture(QtConcurrent::run(m, &MyClass::executeQueries));
MyClass is derived from QObject and emits the "runningQuery(const QString&)"
signal, saying which query it is currently processing. The main thread does
not seem to catch this signal though. I'm sure I'm missing something
obvious, so any suggestions would be very helpful.
Thanks
Marius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100926/d0f064d9/attachment.html
More information about the Qt-interest-old
mailing list