2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-29 05:03:34 +08:00

tools/QDockWidgetCloseDetect: simplify

This commit is contained in:
Sebastien Bourdeauducq 2016-02-14 22:42:25 +01:00
parent 489f69f991
commit 579e789ad7

View File

@ -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)