Translations:Development/Tutorials/Physical Simulation/103/en

QTimer *timer = new QTimer(this);

   connect(timer, SIGNAL(timeout()),
           logic, SLOT( nextTimeStep() ) );
   connect(timer, SIGNAL(timeout()),
           ballGraph, SLOT(nextAnimationFrame()));

} </syntaxhighlight> Mostly, it is the same as before, now we only define the pointers for the xy-plot and the ball-logic and give those pointers to the constructor of the ball-drawing widget. We add the drawing widget to the layout. The widgets are added from the left to the right: the first goes left, the second goes to the right of that and so on.

This page was last edited on 19 July 2019, at 17:42. Content is available under Creative Commons License SA 4.0 unless otherwise noted.