From 04201e712376f71e004eb679702649bb639121f3 Mon Sep 17 00:00:00 2001 From: Jan Lerking Date: Tue, 28 Mar 2023 17:29:23 +0200 Subject: [PATCH] 0.0.1 Initial checkin. /JL --- common.py | 1 + main.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 common.py diff --git a/common.py b/common.py new file mode 100644 index 0000000..052374a --- /dev/null +++ b/common.py @@ -0,0 +1 @@ +VERSION = "0.0.1" \ No newline at end of file diff --git a/main.py b/main.py index e69de29..7dffbc7 100644 --- a/main.py +++ b/main.py @@ -0,0 +1,28 @@ +import sys +from PyQt6.QtWidgets import ( + QApplication, + QMainWindow, + QPushButton, +) +import common +class MainWindow(QMainWindow): + def __init__(self): + super().__init__() + self.setWindowTitle("My App "+common.VERSION) + button = QPushButton("Press Me!") + button.setCheckable(True) + button.clicked.connect(self.the_button_was_clicked) + button.clicked.connect(self.the_button_was_toggled) + # Set the central widget of the Window. + self.setCentralWidget(button) + + def the_button_was_clicked(self): + print("Clicked!") + + def the_button_was_toggled(self, checked): + print("Checked?", checked) + +app = QApplication(sys.argv) +window = MainWindow() +window.show() +app.exec() \ No newline at end of file