QtConcurrent::run 运行类的成员函数
https://stackoverflow.com/questions/2152355/is-it-possible-to-use-qtconcurrentrun-with-a-function-member-of-a-class?answertab=active#tab-top
// call 'QStringList QString::split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const' in a separate thread QString string = ...; QFuture<QStringList> future = QtConcurrent::run(string, &QString::split, QString(", "), QString::KeepEmptyParts, Qt::CaseSensitive); ... QStringList result = future.result();
posted on 2019-10-15 09:13 liujx2019 阅读(1219) 评论(0) 编辑 收藏 举报