PDA

View Full Version : Sleep My Program when it running ?



nhs_0702
24th April 2010, 04:43
i want sleep my program like Sleep( milisecond ) in windows.h ,can you help me ?

borisbn
24th April 2010, 07:30
Try to write your class, inherited from QThread and call parent function msleep


class Sleeper : public QThread
{
public:
static void go( int ms )
{
msleep( ms );
}
};

and call it like this

Sleeper::go( 1000 );