コード例 #1
0
ファイル: main3.cpp プロジェクト: diana4sb/cat-tracking
MyTimer::MyTimer()
{
    // create a timer
    timer = new QTimer(this);

    // setup signal and slot
    connect(timer, SIGNAL(timeout()),
          this, SLOT(MyTimerSlot()));

    // msec
    timer->start(1000);
}
コード例 #2
0
MyTimer::MyTimer(QObject *parent) :
    QObject(parent)
{
    timer = new QTimer(this);
    connect(timer, SIGNAL (timeout()),this, SLOT(MyTimerSlot()));
}