Skip to content

Commit

Permalink
tools/QDockWidgetCloseDetect: simplify
Browse files Browse the repository at this point in the history
sbourdeauducq committed Feb 14, 2016
1 parent 489f69f commit 579e789
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions artiq/gui/tools.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 579e789

Please sign in to comment.