@@ -22,7 +22,6 @@ TrainerSimulator::TrainerSimulator(QWidget * parent, SimulatorInterface * simula
|
||||
|
||||
timer = new QTimer(this);
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(onTimerEvent()));
|
||||
timer->start(10);
|
||||
}
|
||||
|
||||
TrainerSimulator::~TrainerSimulator()
|
||||
@@ -31,6 +30,18 @@ TrainerSimulator::~TrainerSimulator()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void TrainerSimulator::showEvent(QShowEvent *event)
|
||||
{
|
||||
timer->start(10);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void TrainerSimulator::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
timer->stop();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void TrainerSimulator::centerSticks()
|
||||
{
|
||||
if (leftStick->scene())
|
||||
|
||||
Reference in New Issue
Block a user