Trying to understand HideEvent
-
Comparing hideEvent(QHideEvent *) with timerEvent(TimerEvent *)
in TimerEvent, when event occur, it will compared system timerId() with software timerId().
If both is similar, it will execute user function.For HideEvent, is system timerId compared with software timerId(). Is there sure event? (HideEvent)
how is it used?At the moment, I insert killTimer(timer3) in Timer4Update when timer4 is started.
likewise for all the timerUpdate. Is this correct.@
void HideEvent(QHideEvent *event)
{
killTimer(myTimerid);
}void MainWindow::timerEvent(QTimerEvent *event)
{
if (event->timerId()==timer1.timerId())
Timer1update(); //StationBlink_KBP
else if (event->timerId()==timer2.timerId())
Timer2update(); //StationBlink_TP
else if (event->timerId()==timer3.timerId())
Timer3update(); // DoorWillOpen
else if (event->timerId()==timer4.timerId())
killTimer(timer3.timerId());
Timer4update(); // DoorHasOpen
else if (event->timerId()==timer5.timerId())
killTimer(timer4.timerId());
Timer5update(); // DoorIsClosing}
@