Scoodood | 2020-08-06 18:18:52 UTC | #1
Dear Martin,
I am just done watching the Signal, Slots & Events video and done reading the Signals and Slots
chapter on your PySide2 ebook. The sample code below is from your video
self.windowTitleChanged.connect(self.onWindowTitleChange)
def onWindowTitleChange(self, s): # <--- "s" ??
print(s)
How do you know that the signal is also passing along a string variable s
in this case? There are so many type of signals in Qt (pressed, released, drag, move....etc), how do we know each signal is passing along what-else when it is triggered? How do we find out?
Thanks
Impiastro_1 | 2020-08-07 15:59:20 UTC | #2
[quote="Scoodood, post:1, topic:394"]
How do you know that the signal is also passing along a string variable s
in this case? There are so many type of signals in Qt (pressed, released, drag, move…etc), how do we know each signal is passing along what-else when it is triggered? How do we find out?
[/quote]
Create GUI Applications with Python & Qt5 by Martin Fitzpatrick — (PyQt5 Edition) The hands-on guide to making apps with Python — Over 10,000 copies sold!
You can find your answers here: https://doc.qt.io/qtforpython/PySide2/QtGui/QWindow.html?highlight=windowtitlechanged#PySide2.QtGui.PySide2.QtGui.QWindow.windowTitleChanged
I think that in this case the signal emits only one unicode parameter.
ROb
PyQt6 Crash Course — a new tutorial in your Inbox every day
Beginner-focused crash course explaining the basics with hands-on examples.