def show(self): # Creates actions by assigning signals to slots self.app = QtGui.QApplication(sys.argv) BugReporter = QtGui.QMainWindow() self.ui = Ui_BugReporter() self.ui.setupUi(BugReporter) self.create_actions() self.createProducts() BugReporter.show() sys.exit(self.app.exec_())