[PyQt] PyQt5 difference in QObject.sender() behavior?

Phil Thompson phil at riverbankcomputing.com
Thu Jul 31 17:06:50 BST 2014


On 28/07/2014 6:19 pm, Tomas Sobota wrote:
> I'm porting a program from PyQt4 to PyQt5. I had to change the signal
> connections and such, but everything mostly runs.
> 
> I have several widget signals connected to the same slot, so inside the
> slot I check the sending widget with a call to QObject.sender() . This
> works in PyQt4 but in PyQt5 this function always returns None.
> 
> Since the PyQt5 signal behavior has changed from PyQt4, I suspect that 
> I'm
> doing something wrong, but beats me. Any clue?

Not without a short, complete script that demonstrates the problem.

Phil


More information about the PyQt mailing list