[PyQt] Very simple signal/slot "transference"/encapsulation?
J Barchan
jnbarchan at gmail.com
Wed Jan 17 16:40:06 GMT 2018
On 17 January 2018 at 12:36, J Barchan <jnbarchan at gmail.com> wrote:
>
> On 17 January 2018 at 12:32, Denis Rouzaud <denis.rouzaud at 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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180117/b49a3327/attachment.html>
More information about the PyQt
mailing list