8000 Add docstrigs, and comments · realpython/materials@38109c7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 38109c7

Browse files
committed
Add docstrigs, and comments
1 parent aa03164 commit 38109c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyqt-calculator-tutorial/examples/signals_slots.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212

1313

1414
def greeting():
15+
"""Slot function."""
1516
msg.setText('Hello World!')
1617

1718

1819
app = QApplication(sys.argv)
1920
window = QWidget()
2021
window.setWindowTitle('Signals, and Slots')
2122
layout = QVBoxLayout()
23+
2224
btn = QPushButton('Greet')
23-
btn.clicked.connect(greeting)
25+
btn.clicked.connect(greeting) # Connect clicked to greeting()
26+
2427
layout.addWidget(btn)
2528
msg = QLabel('')
2629
layout.addWidget(msg)

0 commit comments

Comments
 (0)
0