16
votes

Using the old syntax, it was possible to forward a signal eg:

connect(sender, SIGNAL(valueChanged(QString,QString)), this, SIGNAL(updateValue(QString,QString)));

I like using the new Qt5 syntax. Is it possible to use the new syntax to forward a signal?

1

1 Answers

21
votes

Signal is nothing more than just a plain method. So you can use it as is. Something like this:

connect(sender, &Sender::valueChanged, receiver, &Receiver::updateValue);