mirror of https://github.com/m-labs/artiq.git
tools/QDockWidgetCloseDetect: simplify
This commit is contained in:
parent
489f69f991
commit
579e789ad7
|
@ -32,7 +32,6 @@ def disable_scroll_wheel(widget):
|
||||||
class QDockWidgetCloseDetect(QtWidgets.QDockWidget):
|
class QDockWidgetCloseDetect(QtWidgets.QDockWidget):
|
||||||
sigClosed = QtCore.pyqtSignal()
|
sigClosed = QtCore.pyqtSignal()
|
||||||
|
|
||||||
def event(self, event):
|
def closeEvent(self, event):
|
||||||
if isinstance(event, QtGui.QCloseEvent):
|
|
||||||
self.sigClosed.emit()
|
self.sigClosed.emit()
|
||||||
return QtWidgets.QDockWidget.event(self, event)
|
QtWidgets.QDockWidget.closeEvent(self, event)
|
||||||
|
|
Loading…
Reference in New Issue