コード例 #1
0
    def mousePressEvent(self, event):
        """ We reimplement this function to store the position of
        the item when a user issues a mouse press.

        """

        self._position = self.pos()

        if (event.modifiers() & Qt.ControlModifier):
            QApplication.setOverrideCursor(QCursor(Qt.SizeAllCursor))
            self.setTextInteractionFlags(Qt.NoTextInteraction)

        return QGraphicsTextItem.mousePressEvent(self, event)
コード例 #2
0
    def mousePressEvent(self, event):
        """ We reimplement this function to store the position of
        the item when a user issues a mouse press.

        """

        self._position = self.pos()

        if (event.modifiers() & Qt.ControlModifier):
            QApplication.setOverrideCursor(QCursor(Qt.SizeAllCursor))
            self.setTextInteractionFlags(Qt.NoTextInteraction)

        return QGraphicsTextItem.mousePressEvent(self, event)
コード例 #3
0
ファイル: einputfield.py プロジェクト: raiscui/edd
    def mousePressEvent(self, event):

        if self.textInteractionFlags() == Qt.NoTextInteraction:
            self.setTextInteractionFlags(Qt.TextEditorInteraction)

        QGraphicsTextItem.mousePressEvent(self, event)
コード例 #4
0
    def mousePressEvent(self, event):

        if self.textInteractionFlags() == Qt.NoTextInteraction:
            self.setTextInteractionFlags(Qt.TextEditorInteraction)

        QGraphicsTextItem.mousePressEvent(self, event)