def __init__(self): super(FenPartWidget, self).__init__() self.item = self.item_class() button = GraphicsButton(self.item) button.setParentItem(self) button.clicked.connect(self.onClicked)
def __init__(self, default, minimum, maximum): super(IntegerWidget, self).__init__() self.minimum = int(minimum) self.maximum = int(maximum) int(default) self.item = CharacterItem(str(default)) button = GraphicsButton(self.item) button.setParentItem(self)