def addMenuItem(self, obj): menuButton = QSvgWidget(obj.getMenuIcon(), self) menuButton.tag = obj self.menuItems.append(menuButton)