aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/opengl/contextinfo.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/opengl/contextinfo.py b/examples/opengl/contextinfo.py
index f0ea345e7..bb747fa99 100644
--- a/examples/opengl/contextinfo.py
+++ b/examples/opengl/contextinfo.py
@@ -173,7 +173,11 @@ class RenderWindow(QWindow):
if self.timer is None:
self.timer = QTimer(self)
self.timer.timeout.connect(self.slotTimer)
+ if not self.timer.isActive():
self.timer.start(10)
+ else:
+ if self.timer and self.timer.isActive():
+ self.timer.stop()
def render(self):
if not self.context.makeCurrent(self):