00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "PSQt/TestThread1.h"
00010 #include <iostream>
00011 using namespace std;
00012
00013 namespace PSQt {
00014
00015
00016
00017 TestThread1::TestThread1(QObject* parent)
00018 : QThread(parent)
00019 {
00020 static uint counter = 0; counter++;
00021 m_thread = counter;
00022 }
00023
00024
00025
00026 void TestThread1::run()
00027 {
00028 for(int i=0; i<1000000; i++){
00029 cout << " Thread:" << m_thread << " loop i=" << i << endl;
00030 sleep(1);
00031 }
00032 }
00033
00034
00035 }
00036