1
我有一个简单的QT对象。当我执行下面的代码时,控制权转移给QT对象,但是我想让QT部分像线程一样工作。是否可以在线程上运行主QT程序?
int main(int argc, char *args[])
{
gui *GUI;
//// before call
QApplication app(argc,args);
GUI = new gui();
GUI->show();
////i want to be able to do stuff here in parallel with the QT code.
// If I spawn a thead here or give a simple printf statement here
// or before call it executes only after GUI exits
return app.exec();
}