Beispiel #1
0
 def __init__(self, parent, direction):
     QLayout.__init__(self, parent)
     self._inner = QBoxLayout(direction)
     self._direction = direction
     self._separator = VLine if not self.isVertical() else HLine
     self._item_count = 0
     self._grid_layouts = []
     self._minimum_row_height = 0
     self._spacing = 0
     self._label_alignment = Qt.AlignCenter
     self._panel_direction = QBoxLayout.TopToBottom
     self._group_alignment = None
Beispiel #2
0
    def __init__(self, parent=None):
        super(SpinWidget, self).__init__(parent)

        base = QBoxLayout(QBoxLayout.TopToBottom, self)
        base.setContentsMargins(0, 0, 0, 0)
        base.setSpacing(0)

        self._dec = SpinWidget.Button(self)
        self._dec.clicked.connect(self._onDecreaseClicked)
        self._dec.setObjectName("Decrease")

        self._inc = SpinWidget.Button(self)
        self._inc.clicked.connect(self._onIncreaseClicked)
        self._inc.setObjectName("Increase")

        base.addWidget(self._dec)
        base.addWidget(self._inc)

        self._updateButtons()
Beispiel #3
0
 def __init__(self, direction, parent=None):
     super(Box, self).__init__(parent)
     self.box = QBoxLayout(direction)
     self.setLayout(self.box)