Hi,
Why use a thread in such a situation? If the main thread is idle, why not use it to do the other thread's job?
I supose that "vql" is learnig how to work with threads.
int main(int argc, char *argv[])
{
MyThread *thread = new MyThread;
thread->start();
thread->wait(); //Here the main thread will stop until your thread exits the run method
qWarning("Output this line after thread finished.");
return 1;
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyThread *thread = new MyThread;
thread->start();
thread->wait(); //Here the main thread will stop until your thread exits the run method
qWarning("Output this line after thread finished.");
return 1;
}
To copy to clipboard, switch view to plain text mode
Bookmarks