Exemplo n.º 1
0
 def mousePressEvent(self, event):
     if event.button() == Qt.RightButton:
         # Rewrite the mouse event to a left button event so the cursor is
         # moved to the location of the pointer.
         event = QMouseEvent(QEvent.MouseButtonPress, event.pos(),
                             Qt.LeftButton, Qt.LeftButton, Qt.NoModifier)
     HintedTextEdit.mousePressEvent(self, event)
Exemplo n.º 2
0
 def mousePressEvent(self, event):
     if event.button() == Qt.RightButton:
         # Rewrite the mouse event to a left button event so the cursor is
         # moved to the location of the pointer.
         event = QMouseEvent(QEvent.MouseButtonPress,
                             event.pos(),
                             Qt.LeftButton,
                             Qt.LeftButton,
                             Qt.NoModifier)
     HintedTextEdit.mousePressEvent(self, event)