diff --git a/Program's_Contributed_By_Contributors/Python_Programs/todoapp.py b/Program's_Contributed_By_Contributors/Python_Programs/todoapp.py index 217250fa2e..efcbec6a34 100644 --- a/Program's_Contributed_By_Contributors/Python_Programs/todoapp.py +++ b/Program's_Contributed_By_Contributors/Python_Programs/todoapp.py @@ -52,8 +52,15 @@ def remove_task(self): def update_task_list(self): self.task_list.setModel(QStringListModel(self.tasks)) + def show_message(self, title, message): + msg_box = QMessageBox(self) + msg_box.setWindowTitle(title) + msg_box.setText(message) + msg_box.setIcon(QMessageBox.Warning) + msg_box.exec() + if __name__ == "__main__": app = QApplication(sys.argv) window = TodoListApp() window.show() - sys.exit(app.exec()) \ No newline at end of file + sys.exit(app.exec())