[Qt-interest] Problem using QtConcurrentRun

Thiago Macieira thiago at kde.org
Wed Jul 7 08:03:57 CEST 2010


On Wednesday 7. July 2010 01.26.05 Thomas Dähling wrote:
> You probably want to make that (JC::dynx_start) since dynx_start is a
> class function.

It needs to be:

	QtConcurrent::run(this, &JC::dynx_start);

because dynx_start is a non-static member.

> 
> 2010/7/6 yogesh upreti <yogesh.upreti at gmail.com>:
> > Hallo Group,
> > I have problem using QtConcurrent.
> > This a part of my code (JC.cpp, which is defining the ui class JC):
> > #include <QFuture>
> > #include <QFutureWatcher>
> > #include <QtConcurrentRun>
> > int JC::startJobs()
> > {
> >             QFuture<void> f1 = QtConcurrent::run(dynx_start);
> >             f1.waitForFinished();
> > }
> > void JC::dynx_start(QString dir)
> > {
> >             some work.....(some loop to keep busy for 2-3 sec)
> > }
> > But I get an error while compiling this program:
> > JC.cpp: error: no matching function for call to 'run(<unresolved
> > overloaded function type>)'
> > I am using Nokia Qt Creator 1.3.1 with Qt 4.6.
> > What I have to include more in this code??? am I missing something?
> > Thanks in Advance
> > Yogesh Upreti
> > 
> > 
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100707/027f131d/attachment.bin 


More information about the Qt-interest-old mailing list