1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include <contextproperty.h> #include "thread.h" #include <QCoreApplication> #include <QThread> int main(int argc, char** argv) { QCoreApplication app(argc, argv); qDebug() << "MAIN THREAD:" << QCoreApplication::instance()->thread(); // Start a thread which will create the ContextProperty. Thread thread; thread.start(); qDebug() << "Entering main loop"; return app.exec(); }