Details
Description
Consider the lambda in this loop. It captures the extra parameter b so that setText is called on the correct widget:
for i in range(3): button = QCheckBox("Click me") button.clicked.connect( lambda checked, b=button: b.setText("Checked!" if checked else "Unchecked!"))
As of PySide6 6.6.0, clicking a checkbox in this example raises:
TypeError: <lambda>() missing 1 required positional argument: 'checked'
The signal QAbstractButton::clicked has one argument checked which has a default value.
The issue does not occur when connecting a lambda to a signal that has no default values for its arguments. For example, connecting a similar lambda to QCheckBox::stateChanged works fine:
button.stateChanged.connect(lambda state, b=button: b.setText(f"New state: {state}"))
Note: The attached example file produces the expected results under your competitor's implementation.