# External Library from PySide6.QtWidgets import QApplication, QTextEdit, QMdiSubWindow class Windows: note_counter = 0 @staticmethod def create_note(app_instance): Windows.note_counter += 1 sub = QMdiSubWindow() sub.setWidget(QTextEdit(f"Notes {Windows.note_counter}")) sub.setWindowTitle(f"Notes {Windows.note_counter}") app_instance.mdi_area.addSubWindow(sub) sub.show()