From e20a061f7e0a043f073e0d31bc304c5090eae267 Mon Sep 17 00:00:00 2001 From: Dan MacLeod Date: Thu, 18 Jul 2024 15:03:58 +0930 Subject: [PATCH] added main.py --- main.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..b3acfe1 --- /dev/null +++ b/main.py @@ -0,0 +1,26 @@ +from PyQt6.QtCore import QSize +from PyQt6.QtWidgets import QApplication, QMainWindow, QPushButton + +import sys + +class MainWindow(QMainWindow): + def __init__(self): + super().__init__() + + self.setWindowTitle("Hello World") + button = QPushButton("Click Me!") + + self.setMinimumSize(QSize(200, 100)) + self.setMaximumSize(QSize(900, 800)) + + self.setCentralWidget(button) + +app = QApplication(sys.argv) + +window = MainWindow() +window.show() # windows are hidden by default + +# start event loop +app.exec() + +