Project

General

Profile

How to add arguments to btn->clicked().connect(this, &SomeClass::foo)?

Added by ivan jobs over 14 years ago

Hi there,

I have a problem. We can connect a slot to a signal. But How to pass arguments to slot when do the "connect" thing?

I want to pass arguments to the slot, what should I do? Thanks.


Replies (1)

RE: How to add arguments to btn->clicked().connect(this, &SomeClass::foo)? - Added by Boris Nagaev over 14 years ago

use boost::bind

button->connect(boost::bind(&Class::method, this, arg1, arg2));
    (1-1/1)