[SOLVED]How to handle our own signals and slot.
-
-
Did you see already "this example?":http://developer.qt.nokia.com/doc/qt-4.8/widgets-digitalclock.html It is a good starter.
-
"This wiki page":http://doc.qt.nokia.com/4.7/signalsandslots.html about signals and slots is a good start.
-
@
class Sleeper : public QThread
{
public:
static void usleep(unsigned long usecs){QThread::usleep(usecs);}
static void msleep(unsigned long msecs){QThread::msleep(msecs);}
static void sleep(unsigned long secs){QThread::sleep(secs);}
};class SleeperThread : public QThread
{
public:
static void msleep(unsigned long msecs)
{
QThread::msleep(msecs);
}
};
@use before connect function or signal emit Sleeper::sleep(10);
May this will help for giving specific delay for emiting signal... :)
[Edit: Be sure and wrap code in @ tags. Thanks! -mlong]