i'm trying to run a member function but but i got an error , help me please
i tried with this line of code
QFuture<qlonglong> future = QtConcurrent::run(this,&backD::analysa);
and analysa() is a methode that returns a qlonglong
CodePudding user response:
i tried many version before asking here and the QtConcurrent::run(this->analysa()); is one of them, i'ts looks like the lambda form works only with void and i'm using qlonglong.
CodePudding user response:
Try QtConcurrent::run([this]{ return analysa(); });
or QtConcurrent::run([this] -> qlonglong { return analysa(); });
, whichever compiles in your case.