QT多线程模板

1.测试版

#include 
 
#include "process.h"
#include 
 
void ThreadFun(void* p)
{
        printf("ThreadFun");
    return;
}
 
 
class A
{
public:
    void RunThread();
 
};
 
 
void A::RunThread()
{
    printf(" in RunThread");
        _beginthread(ThreadFun,0,NULL);
    return;
}
 
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
 
 
   A a1;
   a1.RunThread();
 
    return a.exec();
}

你可能感兴趣的:(QT多线程模板)