Hi all
While creating my QT App I have encountered a problem with passing std::vector to QtConcurrent::run.
Basically I have this funtion:
void g(int bloki, int min, int max, float krok, vector<double> &qam_signal, vector<double> &qam_szum)
I try to run it in a seperate thread to make my GUI responsive when some calculations are made, I do it with:
*obliczenia = QtConcurrent::run(g, bloki, min, max, krok, qam_signal, qam_szum);
sprawdzenie->setFuture(*obliczenia);
I am sure that the method of calling the function is correct. When I delete vectors from my function, there is no problem.
With vectors I get the following error:
error: no matching function for call to 'run(void (&)(int, int, int, float, QVector<double>&, QVector<double>&), int&, int&, int&, int&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&)'
I have no idea why the vectors cannot be passed to the function
Thanks
Marek
Bookmarks