Unsolved Can we have signal with default arguments and pass it to solt
-
for exampple
class A {
signals
signal1( int A,int B,bool val = false);}
class B {
public slot
slot1 (int A, int B, bool val = false)}
A a
B bconnect (a,signal1,b,slot1)
-
-
connect
doesn't care about parameter values, so as long as the number of params matches or slot has less of them you can do the connection. You don't need to use the string based syntax for your example:connect(&a, &A::signal1, &b, &B::slot1); //you can do any of these: emit signal1(42,43); emit signal1(42,43, true); slot1(42,43); slot1(42,43, true);
The only case where you need the string based version is when the signal has less parameters than the slot and the extra slot arguments have default values, which is not the case here.