[Qt-interest] QPushButton's clicked signal(signal/slot issue)

R. Reucher rene.reucher at batcom-it.net
Wed Apr 8 10:43:07 CEST 2009


On Wed April 8 2009 10:37:20 Ravi_Kalepalli wrote:
> But,according to a post I found on the internet-
> according to Qt documentation, within the SIGNAL() and SLOT() macros only
> function signatures are allowed? I.e. you can only say something like
>
> connect(obj1, SIGNAL(sig(int)), obj2, SLOT(slot(int))),
>
> and you cannot say this:
>
> connect(obj1, SIGNAL(sig(int param)), obj2, SLOT(slot(int param))).
That's correct. Therefore you need to create your own signal and emit it, 
including the parameter you want to pass... then you connect() this signal to 
a corresponding slot (with the same function signature) and you're all set!

HTH, René
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/

"355/113 -- Not the famous irrational number PI, but an incredible
simulation!"




More information about the Qt-interest-old mailing list