Exemple #1
0
 def __init__(self, item, orientation=Qt.Horizontal, parent=None):
     QGraphicsLayoutItem.__init__(self, parent)
     self.orientation = orientation
     self.item = item
     if orientation == Qt.Vertical:
         self.item.rotate(-90)
         self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
     else:
         self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Expanding)
 def __init__(self, item, orientation=Qt.Horizontal, parent=None):
     QGraphicsLayoutItem.__init__(self, parent)
     self.orientation = orientation
     self.item = item
     if orientation == Qt.Vertical:
         self.item.rotate(-90)
         self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
     else:
         self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Expanding)
Exemple #3
0
    def __init__(self, parent=None, item=None, ):
        self.__item = None

        QGraphicsLayoutItem.__init__(self, parent, isLayout=False)

        self.setOwnedByLayout(True)
        self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)

        if item is not None:
            self.setItem(item)
Exemple #4
0
    def __init__(self, parent=None, textItem=None):
        QGraphicsLayoutItem.__init__(self, parent)
        if textItem is None:
            textItem = QGraphicsTextItem()

        self.__textItem = textItem
        self.__textItem.setParentItem(self)
        self.__textItem.setPos(0, 0)

        doc_layout = self.document().documentLayout()
        doc_layout.documentSizeChanged.connect(self._onDocumentSizeChanged)
Exemple #5
0
    def __init__(self, parent=None, textItem=None):
        QGraphicsLayoutItem.__init__(self, parent)
        if textItem is None:
            textItem = QGraphicsTextItem()

        self.__textItem = textItem
        self.__textItem.setParentItem(self)
        self.__textItem.setPos(0, 0)

        doc_layout = self.document().documentLayout()
        doc_layout.documentSizeChanged.connect(self._onDocumentSizeChanged)
Exemple #6
0
    def __init__(
        self,
        parent=None,
        item=None,
    ):
        self.__item = None

        QGraphicsLayoutItem.__init__(self, parent, isLayout=False)

        self.setOwnedByLayout(True)
        self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)

        if item is not None:
            self.setItem(item)