def addButton(self, index, iconPath, x, y, active=True, visible=True, mask=None): newButton = Button(index, iconPath, x, y, active, visible, mask) newButton.updateHover() self.buttons.append(newButton)