C++ (Qt)QThread* thread = new QThread(this);obj->moveToThread(thread );obj->start();QMetaObject::invokeMethod(obj, "doSomething);
C++ (Qt)connect(obj, SIGNAL(doSomethingFinished()), this , SLOT(onDoSomethingFinished())); void XXX::onDoSomethingFinished() { QMetaObject::invokeMethod(obj, "doSomething2");}
C++ (Qt)obj->start();
C++ (Qt)QThread* thread = new QThread(this);obj->moveToThread(thread );thread->start();
C++ (Qt)connect(this, SIGNAL(doSomething()), obj, SLOT(doSomething()));connect(this, SIGNAL(doSomething2()), obj, SLOT(doSomething2()));...emit doSomething();...emit doSomething2();