Added docstrings. /JL

This commit is contained in:
2023-03-28 20:46:33 +02:00
parent df96d98db5
commit d4cfd21dc7

View File

@@ -1,3 +1,5 @@
'''pyqt6 example'''
import sys
from PyQt6.QtWidgets import (
QApplication,
@@ -6,6 +8,7 @@ from PyQt6.QtWidgets import (
)
import common
class MainWindow(QMainWindow):
'''MainWindow Class'''
def __init__(self):
super().__init__()
self.setWindowTitle("My App "+common.VERSION)
@@ -17,12 +20,14 @@ class MainWindow(QMainWindow):
self.setCentralWidget(button)
def the_button_was_clicked(self):
'''Slot/signal'''
print("Clicked!")
def the_button_was_toggled(self, checked):
'''Slot/signal'''
print("Checked?", checked)
app = QApplication(sys.argv)
window = MainWindow()
window.show()
app.exec()
app.exec()