def report(self): r = Report() r.type_analysis = self.type_analysis r.header_table = self.table_header r.body_table = self.result r.discipline = self.discipline name = "Дисциплина: " + self.discipline + "/" + self.type_analysis r.name = name list_of_report_object.append(r) list_of_report_name.append(name) msg = QMessageBox() msg.setIcon(QMessageBox.Critical) msg.setText("Отчет сформирован") msg.setInformativeText('Ваш отчет сформирован.') msg.setWindowTitle("Отчет сформирован") msg.exec_()