标签:
#ifndef THREAD_H #define THREAD_H #include <QThread> class Thread : public QThread { Q_OBJECT public: Thread() { } protected: void run() { //add code } }; #endif // THREAD_H
#ifndef THREAD_H #define THREAD_H #include <QThread> #include <QObject> class Thread : public QObject { Q_OBJECT public: Thread() { this->moveToThread(&thread); thread.start(); } private: QThread thread; }; #endif // THREAD_H
标签:
原文地址:http://www.cnblogs.com/jecyhw/p/5326738.html