You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Qt embedding example: Separate drawing and data retrieval timers
In the previous version of this example, if the timer interval would
have been simply decreased to 1ms, the GUI could have appeared as
stuck on some platforms / (slow) machines, because the event loop didn't
find the time to respond to external events such as the user dragging
the window etc. This change does 3 things:
- Puts the data to plot in the self.{x,y}data attributes.
- Separates the timer that updates the self.{x,y}data from the timer
that updates the canvas
- Explains much better the reasoning for the timers' intervals choices
in comments, as well as explaining why the timers are attributed to
self, although they are not used by other methods of the class.
- Use the asynchronous draw_idle() function to further guarantee that
the drawing won't be blocking.
0 commit comments