Thread
:
Is it possible to multiple button 'clicked' signals to the same slot function, but pass different parameters into it ?
View Single Post
ahmadka
2010-06-11 , 20:51
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#
1
Hey guys .. My question here is regarding signals and slots ..
For example, say you have like 10 buttons, all of which pass a number into a factorial function .. the only difference is that they all pass a different number into this one factorial function ... suppose the function is:
int factorial (int a);
so for example, button1 evaluates this function where a =1,
so for example, button2 evaluates this function where a =2,
so for example, button3 evaluates this function where a =3,
and so on ..
In such a case, is there any way to connect these multiple 'clicked' signals from each individual button to the same factorial slot, but just pass in a different value for a .. ? The alternative is to make a connect statement for each individual button, which seems rather inefficient considering they all do more or less the same thing ..
__________________
The Mega Thread Of Almost-Certified N900 Apps that Work (or not) !!
Quote & Reply
|
ahmadka
View Public Profile
Send a private message to ahmadka
Find all posts by ahmadka