[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt]  PyQt5 difference in QObject.sender() behavior?
From:       Tomas Sobota <tom () sobota ! net>
Date:       2014-07-28 17:19:44
Message-ID: CAE-9mpSuPdiy=KfVP_J3vQXE1m0vthTnPBYVeTsKhJYqD1N_qQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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?

Thanks
Tom

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_default" style="font-size:small">I&#39;m porting a \
program from PyQt4 to PyQt5. I had to change the signal connections and such, but \
everything mostly runs.<br><br></div><div class="gmail_default" \
style="font-size:small"> 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.<br><br></div><div \
class="gmail_default" style="font-size:small"> Since the PyQt5 signal behavior has \
changed from PyQt4, I suspect that I&#39;m doing something wrong, but beats me. Any \
clue?<br><br></div><div class="gmail_default" \
style="font-size:small">Thanks<br></div><div class="gmail_default" \
style="font-size:small"> Tom<br></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic