[Qt-interest] slot parameters
sudhish kapoor
kapoorsudhish at gmail.com
Sat Sep 11 05:57:06 CEST 2010
Try assigning the default parameter to the slot as the required page number
at the time of declaration.
Hope it helps..!!
Sudhish
On Fri, Sep 10, 2010 at 10:24 PM, Alessandro Portale <
alessandro.portale at nokia.com> wrote:
> On 9/10/2010 6:32 PM, ext emmanuel_mayssat at lynceantech.com wrote:
> > I would like to have a signal with no parameters (ex. pushbutton
> clicked() ) and have it change my toolBox to page 3 ( slot: toolBox
> changeIndex(int) )
> > Given that clicked cannot send a parameter (and shouldn't), how can I
> have my toolbox receive the signal. In designer I cannot link those the
> above signal and slot together.
> > The first thing that come to mind is to create a pseudo slot on the
> toolBox, such as goToPage3(), which would be an alias to the changeIndex(3)
> slot.
> > Obviously I would like to do this with as little programming as possible
> if at all.
> >
> > Any advice?
>
> Do you have more than one of these buttons, each one making the app jump
> to another page? In that case, I would use QSignalMapper
> http://doc.qt.nokia.com/latest/qsignalmapper.html
>
> It let's you map several parameterless signal sources to one slot with
> parameter.
>
> Hope that helps,
> Alessandro
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
Regards,
Sudhish Kapoor.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100911/ff0db6c5/attachment.html
More information about the Qt-interest-old
mailing list