[Kde-perl] Help with connect
Roy Souther
roy at SiliconTao.com
Mon Jul 4 01:21:24 CEST 2005
I am not an expert with PerlQt but I am an expert with Qt C++.
These are the problems I found with your code and I have attached the
fixed version.
1) PushButtons do not have a slot for setText. You cannont connect an
event to that as a slot.
2) Slots must take only arguments given by the signal. You tried to give
it a contant that was not in the signal.
3) Slots can only exist in an object not linear code like you tired to
do.
To fix this I changed your linear code to an object. Connected the
signal event to a actual slot and made the slot change the text like you
tried.
I hope this helps to explain why your code did not work and my fix does.
On Sun, 2005-07-03 at 12:41 +0200, Andrea Benazzo wrote:
> Hi!
>
> I need some help with the signal-slot machine...
>
> I created this little script, but I've a problem with the correctness of the
> "connect".
>
>
> please, tell me where's the error, since I've lsot a couple of hours till
> now, but I found nothing,
>
> I attach the script.
>
> Thank you,
>
> Andy
> _______________________________________________
> Kde-perl mailing list
> Kde-perl at kde.org
> https://mail.kde.org/mailman/listinfo/kde-perl
Roy Souther
www.SiliconTao.com
Let Open Source help your business move beyond.
For security this message is digitally authenticated by GnuPG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-perl/attachments/20050704/ccb272c5/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pl
Type: application/x-perl
Size: 1568 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-perl/attachments/20050704/ccb272c5/test.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.kde.org/pipermail/kde-perl/attachments/20050704/ccb272c5/attachment.pgp
More information about the Kde-perl
mailing list