多线程设计
class thread : public QThread{ void run();}thread::run(){ QFile f("test"); QTextStream textstream( &f ); textstream<<"0. Enter thread->run function!"<<'\n'; //process data1; textstream<<"1. process data1"<<'\n'; ........ //process data2; textstream<<"2. process data2"<<'\n'; ........ //process data3; textstream<<"3. process data3"<<'\n'; ........ f.close();}class a : public QWidget{ public slots: void process();}void a::process(){ QFile f("test"); QTextStream textstream( &f ); textstream<<"1. ready to start the thread!"; thread* t = new thread(); t->start(); textstream<<"2. start the thread!"; f.close();}