Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 3
0
    def mousePressEvent(self, event):

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

        QGraphicsTextItem.mousePressEvent(self, event)
Ejemplo n.º 4
0
    def mousePressEvent(self, event):

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

        QGraphicsTextItem.mousePressEvent(self, event)