I have many QActions
and I would like to connect their triggered(bool)
signal to a specific slot which gets an integere number as input, let's say setX(int x)
. I need to specify x
in connect callback. For example:
connect(actionV, &QAction::triggered,
this, &TheClass::setX /* somehow x=10 */);
I tried using std::bind
and it does not work:
connect(actionV, &QAction::triggered,
std::bind(this, &TheClass::setX, 10));