0.0.1 Initial checkin. /JL

This commit is contained in:
2023-03-28 17:29:23 +02:00
parent 75653d28e1
commit 04201e7123
2 changed files with 29 additions and 0 deletions

1
common.py Normal file
View File

@@ -0,0 +1 @@
VERSION = "0.0.1"

28
main.py
View File

@@ -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()