我想使用QtConcurrent::mapped并行地处理数据的std::vector。当我使用一个空闲函数作为MapFunctor的QtConcurrent::mapped参数时,一切似乎都很好。下面是一个最少可重复的例子: int x;y) { return x + y.x; } std::vector<int>
我正在尝试使用一个函数来记录所选时间的视频,所以我使用一个信号来启动它,但是GUI仍然是块的,所以我现在尝试使用QtConcurrent::run在一个分开的线程中完成它。VideoProcessor::record(int index, int time, int frames, QString path){
QFuture<void> future = QtConcurrentController::StartRecording(int index, int time, int frames, QString path)
为了做到这一点,我试图使用:它可能比使用显式QFuture对象更简单。NOTE: this all seems to work:#include <iostream>#include <QtConcurrent当我试图在一个额外的"datamodel.h“类中封装QtConcurrent::块The ()时,就会出现这个问题:
#i