davidovv
6th May 2011, 10:02
I have 2 classes A and B
class A has a signal emitMessage(QString)
class B has a slot showMessage(QString, int)
is there a way to connect these two with constant int value, something like
connect(A, SIGNAL(emitCritical(QString, 5)), B, SLOT(showMessage(QString, int)));
or
connect(A, SIGNAL(emitCritical(QString)), B, SLOT(showMessage(QString, 5)));
I know that if signal had more arguments, they will be ignored in slot, but is it possible to have default values for slot arguments
class A has a signal emitMessage(QString)
class B has a slot showMessage(QString, int)
is there a way to connect these two with constant int value, something like
connect(A, SIGNAL(emitCritical(QString, 5)), B, SLOT(showMessage(QString, int)));
or
connect(A, SIGNAL(emitCritical(QString)), B, SLOT(showMessage(QString, 5)));
I know that if signal had more arguments, they will be ignored in slot, but is it possible to have default values for slot arguments