hakermania
16th July 2011, 09:03
Hello, I am having some global functions in a separate glob.h file included in the *.cpp files that need to use these functions...
My question is, how can I start one of these global functions using qtconcurrentrun while these functions don't have a parent?
For example, for a normal use, I would call
QtConcurrent::run(this, &MainWindow::my_function);
But the global function isn't in 'this' object and doesn't have a class (like MainWindow)...
I tried with NULL instead of 'this' and simply function's name as second argument...
I am not sure who to use it.... Anybody with an idea :D ?
My question is, how can I start one of these global functions using qtconcurrentrun while these functions don't have a parent?
For example, for a normal use, I would call
QtConcurrent::run(this, &MainWindow::my_function);
But the global function isn't in 'this' object and doesn't have a class (like MainWindow)...
I tried with NULL instead of 'this' and simply function's name as second argument...
I am not sure who to use it.... Anybody with an idea :D ?