Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 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)
Пример #6
0
 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)
Пример #7
0
 def mousePressEvent(self, event):
     QPlainTextEdit.mousePressEvent(self, event)
     self.go_to_error(event)
Пример #8
0
 def mousePressEvent(self, event):
     QPlainTextEdit.mousePressEvent(self, event)
     self.go_to_error(event)