def setGeometry(self, rect): # TODO: specifiy if the geometry should be set relative to the # bounding rect top left corner if self.__item: self.__item.setPos(rect.topLeft()) QGraphicsLayoutItem.setGeometry(self, rect)
def setGeometry(self, rect): QGraphicsLayoutItem.setGeometry(self, rect) if self.orientation == Qt.Horizontal: self.item.setPos(rect.topLeft()) else: self.item.setPos(rect.bottomLeft())