I am trying to multithread my image recording application in order to optimize performances and prevent the GUI from freezing. I tried to create a vector of CaptureThread (my class which extends QThread) but it does not compile...
here is my code:
vector<CaptureThread> v_ct_Threads(i_SelectedCameras);
for(int i = 0; i < i_SelectedCameras; i++) {
v_ct_Threads[i] = CaptureThread(i, qsb_Duration->value());
v_ct_Threads[i].start();
}
for(int i = 0; i < i_SelectedCameras; i++) {
v_ct_Threads[i].wait();
}
And the error:
use of deleted function ‘CaptureThread& CaptureThread::operator=(CaptureThread&&)’
v_ct_Threads[i] = CaptureThread(i, qsb_Duration->value());
I guess it's a stupid mistake but I am a beginner in C++ and Qt...