示例#1
0
文件: base.py 项目: 0xBADCA7/spyder
 def closeEvent(self, event):
     """Reimplement Qt method."""
     self.plugin.dockwidget.setWidget(self.plugin)
     self.plugin.dockwidget.setVisible(True)
     self.plugin.undock_action.setDisabled(False)
     self.plugin.switch_to_plugin()
     QMainWindow.closeEvent(self, event)
示例#2
0
文件: base.py 项目: zerocewl/spyder
 def closeEvent(self, event):
     """Reimplement Qt method."""
     self.plugin.set_ancestor(self.plugin.main)
     self.plugin.dockwidget.setWidget(self.plugin)
     self.plugin.dockwidget.setVisible(True)
     self.plugin.switch_to_plugin()
     QMainWindow.closeEvent(self, event)
     # Qt might want to do something with this soon,
     # So it should not be deleted by python yet.
     # Fixes spyder-ide/spyder#10704
     self.plugin.__unsafe__window = self
     self.plugin._undocked_window = None
示例#3
0
    def closeEvent(self, event):
        """ """
        if self.packages.busy:
            answer = QMessageBox.question(
                self,
                'Quit Conda Manager?',
                'Conda is still busy.\n\nDo you want to quit?',
                buttons=QMessageBox.Yes | QMessageBox.No)

            if answer == QMessageBox.Yes:
                QMainWindow.closeEvent(self, event)
                # Do some cleanup?
            else:
                event.ignore()
        else:
            QMainWindow.closeEvent(self, event)
示例#4
0
 def closeEvent(self, *args, **kwargs):
     self.save_settings()
     # Enable paste of clipboard after termination
     clipboard = QApplication.clipboard()
     event = QEvent(QEvent.Clipboard)
     QApplication.sendEvent(clipboard, event)
     return QMainWindow.closeEvent(self, *args, **kwargs)
示例#5
0
文件: base.py 项目: timgates42/spyder
    def closeEvent(self, event):
        """Reimplement Qt method."""
        self.plugin.set_ancestor(self.plugin.main)
        self.plugin.dockwidget.setWidget(self.plugin)
        self.plugin.dockwidget.setVisible(True)
        self.plugin.switch_to_plugin()

        # Save window geometry to restore it when undocking the plugin
        # again.
        geometry = self.saveGeometry()
        self.plugin.set_option('window_geometry', qbytearray_to_str(geometry))

        # Close window
        QMainWindow.closeEvent(self, event)

        # Qt might want to do something with this soon,
        # So it should not be deleted by python yet.
        # Fixes spyder-ide/spyder#10704
        self.plugin.__unsafe__window = self
        self.plugin._undocked_window = None
示例#6
0
 def closeEvent(self, event):
     QSettings().setValue("geometry", self.saveGeometry())
     pluginmanager._observers.clear()  # Detach all observers
     msg.progressbar = None  # Remove progressbar from Qt hierarchy
     msg.statusbar = None  # Remove statusbar from Qt hierarchy
     QMainWindow.closeEvent(self, event)
示例#7
0
 def closeEvent(self, event):
     QSettings().setValue("geometry", self.saveGeometry())
     QMainWindow.closeEvent(self, event)
示例#8
0
 def closeEvent(self, event):
     self.presenter.clear_observer()
     self.centralWidget().close()
     QMainWindow.closeEvent(self, event)
     self.deleteLater()
示例#9
0
 def closeEvent(self, event):
     #Use QT settings saving mechanism
     #settings stored in ~/.config/Equinor/ErtGui.conf
     self.__saveSettings()
     QMainWindow.closeEvent(self, event)
示例#10
0
 def closeEvent(self, event):
     self.closing.emit()
     QMainWindow.closeEvent(self, event)
示例#11
0
 def closeEvent(self, event):
     self.closing.emit()
     QMainWindow.closeEvent(self, event)
     self.deleteLater()
示例#12
0
 def closeEvent(self, event):
     self.closing.emit()
     QMainWindow.closeEvent(self, event)
     self.deleteLater()
示例#13
0
 def closeEvent(self, event):
     self.presenter.clear_observer()
     self.centralWidget().close()
     QMainWindow.closeEvent(self, event)
     self.deleteLater()