int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
HelloThread thread;
thread.start();
qDebug() << "hello from GUI thread " << app.thread()->currentThreadId();
thread.wait(); // do not exit before the thread is completed!
return 0;
}
http://blog.csdn.net/wsh6759/article/details/7432337
原文:http://www.cnblogs.com/findumars/p/6263194.html