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

List:       pykde
Subject:    Re: [PyQt] Very simple signal/slot "transference"/encapsulation?
From:       J Barchan <jnbarchan () gmail ! com>
Date:       2018-01-17 16:40:06
Message-ID: CABz3M__vdqReoU4UowESqy0+VOkGMpuC_bbfFEeBa_17Cowa3Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On 17 January 2018 at 12:36, J Barchan <jnbarchan@gmail.com> wrote:

>
> On 17 January 2018 at 12:32, Denis Rouzaud <denis.rouzaud@gmail.com>
> wrote:
>
>> Hi Jonathan,
>>
>> You can connect a signal directly to another signal. So in your class
>> definition:
>>
>> ​​
>> editingFinished = pyqtSignal()
>>
>> def __init__(self, ....):
>>   .....
>>   myLineEdit.editingFinished.connect(self.editingFinished)
>>
>> Hope this helps,
>>
>> Denis
>>
>>
>>
>>
> ​
> Oohhh, that looks fairly neat and simple!  And my code editor should still
> see the editingFinished as a member (variable) of my class, for code
> completion.
>
> I'll try this later today and see, thanks... !
>

​@Denis,
Well, thanks for that ​editingFinished = pyqtSignal(), works like a treat,
just what I had in mind!

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_default" \
style="font-family:tahoma,sans-serif"><br></div><div class="gmail_extra"><br><div \
class="gmail_quote">On 17 January 2018 at 12:36, J Barchan <span dir="ltr">&lt;<a \
href="mailto:jnbarchan@gmail.com" target="_blank">jnbarchan@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
class="gmail_extra"><div><div class="gmail-h5"><br><div class="gmail_quote">On 17 \
January 2018 at 12:32, Denis Rouzaud <span dir="ltr">&lt;<a \
href="mailto:denis.rouzaud@gmail.com" \
target="_blank">denis.rouzaud@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Jonathan,<div><br></div><div>You \
can connect a signal directly to another signal. So in your class \
definition:</div><div><br></div><div><div \
style="font-family:tahoma,sans-serif;display:inline" \
class="gmail_default">​​</div>editingFinished = \
pyqtSignal()</div><div><br></div><div>def __init__(self, ....):</div><div>   \
.....</div><div>   myLineEdit.editingFinished.con<wbr>nect(self.editingFinished)</div><div><br></div><div>Hope \
this helps,</div><div><br></div><div>Denis</div><div><br></div><div><br></div></div><br></blockquote></div><br></div></div><div>​<div \
style="font-family:tahoma,sans-serif">Oohhh,  that looks fairly neat and simple!   \
And my code editor should still see  the editingFinished as a member (variable) of my \
class, for code  completion.</div><div \
style="font-family:tahoma,sans-serif"><br></div>I&#39;ll try this later today and \
see, thanks... !</div></div></div> </blockquote></div><br><div \
style="font-family:tahoma,sans-serif" class="gmail_default">​@Denis,</div><div \
style="font-family:tahoma,sans-serif" class="gmail_default">Well, thanks for that \
​<span style="font-family:monospace,monospace">editingFinished = \
pyqtSignal()</span>, works like a treat, just what I had in \
mind!<br></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://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