From 579e789ad707a32d41b4ceb8c784ccb9839d8c84 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 14 Feb 2016 22:42:25 +0100 Subject: [PATCH] tools/QDockWidgetCloseDetect: simplify --- artiq/gui/tools.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/artiq/gui/tools.py b/artiq/gui/tools.py index 5de02c3a9..414cf0ef8 100644 --- a/artiq/gui/tools.py +++ b/artiq/gui/tools.py @@ -32,7 +32,6 @@ def disable_scroll_wheel(widget): class QDockWidgetCloseDetect(QtWidgets.QDockWidget): sigClosed = QtCore.pyqtSignal() - def event(self, event): - if isinstance(event, QtGui.QCloseEvent): - self.sigClosed.emit() - return QtWidgets.QDockWidget.event(self, event) + def closeEvent(self, event): + self.sigClosed.emit() + QtWidgets.QDockWidget.closeEvent(self, event)