[Qt-interest] Problem using QtConcurrentRun

yogesh upreti yogesh.upreti at gmail.com
Thu Jul 8 10:50:24 CEST 2010


Now its Working,
I have changed my function to
Public:
static void dynx_start(QString dir);

after this defining function like
void JC::dynx_start(QString);

and Running Concurrent
QFuture<void> f1 = QtConcurrent::run(dynx_start, QString("Hallo"));

works for me...

But now I can't access gui namespace of JC (created by nokia QtCreator)
anymore

Regds,
Yogesh Upreti


On Wed, Jul 7, 2010 at 12:26 AM, Thomas Dähling
<t.daehling at googlemail.com>wrote:

> You probably want to make that (JC::dynx_start) since dynx_start is a
> class function.
>
> 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
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100708/c484a6ef/attachment.html 


More information about the Qt-interest-old mailing list