## Notepad-a-like ```python #!/usr/bin/env python3 import sys from PySide6.QtWidgets import * from PySide6.QtGui import QIcon from PySide6.QtCore import QCoreApplication, Qt, qVersion def main(): QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling) QCoreApplication.setAttribute(Qt.AA_UseHighDpiPixmaps) app = QApplication() gallery = MainWidget() gallery.show() sys.exit(app.exec()) class MainWidget(QDialog): def __init__(self): super().__init__() self.setWindowIcon(QIcon(':/qt-project.org/logos/pysidelogo.png')) self.resize(640,480) main_layout = QGridLayout(self) plain_textedit = QPlainTextEdit("Events\n") self.plain_textedit = plain_textedit main_layout.addWidget(plain_textedit,0,0) qv = qVersion() self.setWindowTitle(f"Events:Qt {qv}") if __name__ == "__main__": main() ```