void hello(QString name)
{
system(hq);
qDebug() << "Hello" << name << "from" << QThread::currentThread();
}
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QFuture<void> f1 = run(hello, QString(hq));
f1.waitForFinished();
}
上面这段代码可以通过,现在我的问题是函数hello(QString name)改下为void myclass::hello(QString myfile)
调用的时候
myclass *myclasssl=new myclass;
QFuture<void> f1 = run(myclasssl->hello, "cc.txt");
编译出错:
错误:no matching function for call to 'run(<unresolved overloaded function type>, QString)'
编译报错