8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0da7d89 commit e632e9eCopy full SHA for e632e9e
galleries/examples/user_interfaces/embedding_in_qt_sgskip.py
@@ -56,6 +56,13 @@ def _update_canvas(self):
56
# Shift the sinusoid as a function of time.
57
self._line.set_data(t, np.sin(t + time.time()))
58
self._line.figure.canvas.draw()
59
+ # If the timer frequency is fast enough for the Qt platform (in case
60
+ # the frequency is increased or if the desktop is overloaded), the GUI
61
+ # might get stuck because the event loop won't manage to respond to
62
+ # events such as window resize etc while the timer is running. This
63
+ # forces the timer to process the GUI events and to provide a smooth
64
+ # experience.
65
+ qapp.processEvents()
66
67
68
if __name__ == "__main__":
0 commit comments