From 3d22fcb830f0004e7498058d208384b38575e635 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Thu, 7 Nov 2024 10:09:36 +0100 Subject: [PATCH] better --- wgpu/gui/qt.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/wgpu/gui/qt.py b/wgpu/gui/qt.py index aa2279c5..ae226035 100644 --- a/wgpu/gui/qt.py +++ b/wgpu/gui/qt.py @@ -184,10 +184,6 @@ def paintEvent(self, event): # noqa: N802 - this is a Qt method # Methods that we add from wgpu (snake_case) - def update(self): - # Overload update() because that's how Qt devs are used to requesting a new draw - self.request_draw() - def _request_draw(self): # Ask Qt to do a paint event QtWidgets.QWidget.update(self) @@ -494,16 +490,16 @@ def __init__(self, *, size=None, title=None, **kwargs): # Qt methods + def update(self): + super().update() + self._subwidget.update() + def closeEvent(self, event): # noqa: N802 self._subwidget._is_closed = True self.submit_event({"event_type": "close"}) # Methods that we add from wgpu (snake_case) - def update(self): - # Overload update() because that's how Qt devs are used to requesting a new draw - self.request_draw() - def _request_draw(self): self._subwidget._request_draw()