[Qt-interest] how to connect ?
chandrasekar wagmare
sekarwagmare at gmail.com
Wed Feb 25 13:47:19 CET 2009
thank you very much Mr.Ian Thomson ... it is a better way ..
On Wed, Feb 25, 2009 at 5:43 PM, Ian Thomson <Ian.Thomson at iongeo.com> wrote:
> Hi,
>
> It sounds like you should use the QSignalMapper object to make this is a
> little easier and safer.
>
> http://doc.trolltech.com/4.4/qsignalmapper.html
>
> Cheers,
> Ian.
>
> chandrasekar wagmare wrote:
> > 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
> > <http://ankit17.ag>@gmail.com <http://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 <mailto: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 <mailto: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 <mailto:ankit_agarwal at vegayan.com>
> > Blog : http://ankit17.wordpress.com
> >
> >
> >
> >
> > --
> > CHANDRU
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> This email and any files transmitted with it are confidential and are
> intended solely for the use of the individual or entity to whom they are
> addressed. If you are not the original recipient or the person responsible
> for delivering the email to the intended recipient, be advised that you have
> received this email in error, and that any use, dissemination, forwarding,
> printing, or copying of this email is strictly prohibited. If you received
> this email in error, please immediately notify the sender and delete the
> original.
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
CHANDRU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090225/a47bdcb5/attachment.html
More information about the Qt-interest-old
mailing list