valueChanged
is a signal of Foo
itself, so you should use self.valueChanged.connect(self.do_something)
instead of self.t.valueChanged.connect(self.do_something)
. After all, the value that should be emitted with the signal is determined when the signal is emitted, not when connecting the signal to a slot.
solved How to apply PyQt5 Event on a list with values instead of single variable value? [closed]