MainWindow mw;
{
// nothing to do !!!
}
void MyThread::run()
{
mw.show();
connect(timer,SIGNAL(timeout()), this, SLOT(ToDo()));
timer->setInterval(2009);
timer->start();
return a.exec();
}
void MyThread::ToDo() {
long i=0,h=0,m=0,s=0;
while(i<3)
{
std::string str = "Time: ";
char msg[100];
Converter(gTime,h,m,s);
sprintf(msg,"%02ld:%02ld:%02ld",h,m,s);
str += msg;
w
->setText
(QString::fromUtf8(str.
c_str(),str.
size()));
sleep(1);
i++;
gTime--;
}
a.closeAllWindows();
}
int main()
{
MyThread mt(0);
mt.start();
mt.wait();
}