Project

General

Profile

Can Connect() pass parameters?

Added by Jason Lamar about 15 years ago

Hi again :)

I was just wondering if, when connecting things, can I pass parameters to the callback function? i.e.

[code]

WPushButton *submit = new WPushButton(tr("submit"),box);

submit->clicked().connect(SLOT (this, Home::submit));

void Home::submit( additional parameters)

{

}

[/code]

I know that I can map multiple senders to a single slot with WSignalMapper, but that only seems to allow for a single argument. How would I do it, aside from a whole bunch of global/member variables?

Thanks again for all the help :)


Replies (1)

RE: Can Connect() pass parameters? - Added by Jason Lamar about 15 years ago

Figured it out, boost::bind works wonders ;) Feel free to delete this thread.

    (1-1/1)