def __init__(self, appInfo, author): super(EditingAuthorMenu, self).__init__() loadUi('adding_author.ui', self) this_author = Author() for book in author.book_list: this_author.add_book(book) for genre in author.genre_list: this_author.add_genre(genre) appInfo.library.delete_author(author.name) self.lineEdit.setText(author.name) self.lineEdit_2.setText(str(author.birth_year)) self.lineEdit_3.setText(str(author.death_year)) self.textEdit.setText(author.description) self.pushButton_8.clicked.connect(self.closing) self.pushButton_9.clicked.connect( lambda: self.adding(appInfo, this_author, author.name)) self.pushButton_5.clicked.connect( lambda: self.adding_book(this_author, appInfo)) self.pushButton_6.clicked.connect( lambda: self.adding_genre(this_author)) self.pushButton_10.clicked.connect( lambda: self.delete_book(this_author)) self.pushButton_11.clicked.connect( lambda: self.delete_genre(this_author)) self.update_tables(this_author)