참고 https://forum.qt.io/topic/4752/how-to-stop-a-qtimer-singleshot/7


1
2
3
4
5
6
7
8
9
10
11
12
13
14
@
m_myLongTimer = new QTimer(this);
m_myLongTimer->setInterval(360000);
m_myLongTimer->setSingleShot(true);
connect(m_myLongTimer, SIGNAL(timeout()), SLOT(myslot()));
m_myLongTimer->start();
@
 
You can use this to stop again:
@
m_myLongTimer->stop();
@
 
Edit: added connect call to sample code
cs


+ Recent posts