Beispiel #1
0
 def setGeometry(self, rect):
     QStackedLayout.setGeometry(self, rect)
     for i in range(self.count()):
         w = self.widget(i)
         hint = w.sizeHint()
         geom = QRect(rect)
         size = clipMinMax(rect.size(), w.minimumSize(), w.maximumSize())
         size = fixSizePolicy(size, hint, w.sizePolicy())
         geom.setSize(size)
         if geom != w.geometry():
             w.setGeometry(geom)
Beispiel #2
0
 def setGeometry(self, rect):
     QStackedLayout.setGeometry(self, rect)
     for i in range(self.count()):
         w = self.widget(i)
         hint = w.sizeHint()
         geom = QRect(rect)
         size = clipMinMax(rect.size(), w.minimumSize(), w.maximumSize())
         size = fixSizePolicy(size, hint, w.sizePolicy())
         geom.setSize(size)
         if geom != w.geometry():
             w.setGeometry(geom)
Beispiel #3
0
    def setGeometry(self, rect):
        if not isinstance(rect, QRect):
            raise TypeError("QRect required")

        if rect == self.__rect:
            return

        self.__rect = QRect(rect)

        QStackedLayout.setGeometry(self, rect)

        for i in range(self.count()):
            w = self.widget(i)
            hint = w.sizeHint()
            geom = QRect(rect)
            size = clipMinMax(rect.size(), w.minimumSize(), w.maximumSize())
            size = fixSizePolicy(size, hint, w.sizePolicy())
            geom.setSize(size)
            if geom != w.geometry():
                w.setGeometry(geom)