blob: a6a7c8aa72cebe6969613cb0828fe813f24a4669 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include <contextproperty.h>
#include "thread.h"
#include <QCoreApplication>
#include <QDebug>
int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
qDebug() << "Main thread is" << QThread::currentThread();
// Start a thread which will use the backend
Thread* thread = new Thread();
thread->start();
thread->wait();
// Kill the thread
qDebug() << "Thread stopped, deleting it";
delete thread;
qDebug() << "Entering main event loop";
return app.exec();
}
|