I'm new to Qt, here is my question.
For example I have class like this:
class ClassA
{
public:
MyClass();
B();
C();
private:
int d, e, f;
}
I want B() and C() to run in separate threads. I don't want to create Worker class or WorkerThread class inherited from QThread because I plan to use a lot of ClassA's private properties inside B() and C(). What is the best way to run B() and C() in different threads?
Самый простой путь это QtConcurrent::run:
ClassA object;
QtConcurrent::run(object, &ClassA::B);
QtConcurrent::run(object, &ClassA::C);
Продвижение своими сайтами как стратегия роста и независимости