Connecting one signal to another

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Connecting one signal to another

Patrick Stinson-3
Hello!

What is the proper way to connect one signal to simply emit another? Connecting to the second signal’s `emit` method causes issues when disconnecting the signal again.

Thanks!

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Connecting one signal to another

Florian Bruhin
On Mon, Jul 22, 2019 at 12:45:33PM -0800, Patrick Stinson wrote:
> What is the proper way to connect one signal to simply emit another?
> Connecting to the second signal’s `emit` method causes issues when
> disconnecting the signal again.

obj.signal1.connect(obj.signal2)

Florian

--
https://www.qutebrowser.org | [hidden email] (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
         I love long mails! | https://email.is-not-s.ms/

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Connecting one signal to another

Patrick Stinson-3
That does indeed work. I tested and convinced myself this didn’t work a couple of years ago. I was wrong.

> On Jul 22, 2019, at 1:14 PM, Florian Bruhin <[hidden email]> wrote:
>
> On Mon, Jul 22, 2019 at 12:45:33PM -0800, Patrick Stinson wrote:
>> What is the proper way to connect one signal to simply emit another?
>> Connecting to the second signal’s `emit` method causes issues when
>> disconnecting the signal again.
>
> obj.signal1.connect(obj.signal2)
>
> Florian
>
> --
> https://www.qutebrowser.org | [hidden email] (Mail/XMPP)
>   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
>         I love long mails! | https://email.is-not-s.ms/

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt