Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.5.0
-
None
Description
Currently it is possible to connect signals with lambda expressions. But it is still not possible to use std::bind like this:
std::string str = "fixedValue";
connect(myObj, &MyObj::sig, std::bind(&targetMethod, str, _1));
Currently I use as workaround (because to use a new QSignalMapper for each connection is...)
std::string str = "fixedValue"; connect(myObj, &MyObj::sig, [&, str](int value) {targetMethod(str, value)});
So it would be nice if std::bind is supported to increase readability of code (and this makes QSignalMapper obsolete).