def mousePressEvent(self, event): """ When the execution fail, allow to press the links in the traceback, to go to the line when the error occur. """ QPlainTextEdit.mousePressEvent(self, event) self.go_to_error(event)
def mousePressEvent(self, event): """ When the execution fail, allow to press the links in the traceback, to go to the line when the error occur. """ QPlainTextEdit.mousePressEvent(self, event) self.go_to_error(event)
def mousePressEvent(self, event): if event.modifiers() == Qt.ControlModifier: cursor = self.cursorForPosition(event.pos()) self.setTextCursor(cursor) self.go_to_definition(cursor) elif event.button() == Qt.RightButton and \ not self.textCursor().hasSelection(): cursor = self.cursorForPosition(event.pos()) self.setTextCursor(cursor) QPlainTextEdit.mousePressEvent(self, event)
def mousePressEvent(self, event): if event.modifiers() == Qt.ControlModifier: cursor = self.cursorForPosition(event.pos()) self.setTextCursor(cursor) self.go_to_definition(cursor) elif event.button() == Qt.RightButton and \ not self.textCursor().hasSelection(): cursor = self.cursorForPosition(event.pos()) self.setTextCursor(cursor) QPlainTextEdit.mousePressEvent(self, event)
def mousePressEvent(self, event): """Reimplement Qt method""" if os.name != 'posix' and event.button() == Qt.MidButton: self.setFocus() event = QMouseEvent(QEvent.MouseButtonPress, event.pos(), Qt.LeftButton, Qt.LeftButton, Qt.NoModifier) QPlainTextEdit.mousePressEvent(self, event) QPlainTextEdit.mouseReleaseEvent(self, event) self.paste() else: QPlainTextEdit.mousePressEvent(self, event)
def mousePressEvent(self, event): """Reimplement Qt method""" if os.name != 'posix' and event.button() == Qt.MidButton: self.setFocus() event = QMouseEvent(QEvent.MouseButtonPress, event.pos(), Qt.LeftButton, Qt.LeftButton, Qt.NoModifier) QPlainTextEdit.mousePressEvent(self, event) QPlainTextEdit.mouseReleaseEvent(self, event) self.paste() else: QPlainTextEdit.mousePressEvent(self, event)
def mousePressEvent(self, event): QPlainTextEdit.mousePressEvent(self, event) self.go_to_error(event)
def mousePressEvent(self, event): QPlainTextEdit.mousePressEvent(self, event) self.go_to_error(event)