[Qt-interest] how to connect ?

chandrasekar wagmare sekarwagmare at gmail.com
Wed Feb 25 13:11:44 CET 2009


thanks for reply to both Ankit Agarwal and jesus fernandes
        yes i try to use a same private slot function for all items emitting
the SIGNAL activated()
     currently i use sender() function in if statement .. it works fine!
      but i just like the way the code moves as i can pass argument with the
SLOT

On Wed, Feb 25, 2009 at 5:30 PM, Ankit Agarwal <ankit17.ag at gmail.com> wrote:

> Hi,
> As far as my knowledge stands, that requirement that you have is not
> possible.
> The slot can have lesser arguements than the signal but reverse is not
> possible.
> As I can understand from your requirement, you need to call a slot that
> already exsits but you do not want to pass an arguement to it. For that, you
> can assign a default value to the arguement in the function pageIndex() and
> then connect the activated() signal to the pageIndex() slog with having to
> pass any arguement.
>
> Hope this helps.
>
> On Wed, Feb 25, 2009 at 5:24 PM, chandrasekar wagmare <
> sekarwagmare at gmail.com> wrote:
>
>> hi friends,
>> is it possible to connect like this
>>          connect(item1, SIGNAL(activated()), this, SLOT(pageIndex(int)));
>>
>>             i.e. activated() is a private signal having no arguments and
>> slot is having an argument (int) .. is it possible to connect like this ..
>> ?
>>
>>
>>
>> --
>> CHANDRU
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
>
> --
> Regards,
> Ankit Agarwal
> SW Engineer
> Vegayan Systems
> email : ankit_agarwal at vegayan.com
> Blog : http://ankit17.wordpress.com
>



-- 
CHANDRU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090225/7c419235/attachment.html 


More information about the Qt-interest-old mailing list