Solved Connecting with QSignalMapper
-
Hi,
Why does the following expression not compile ?
connect(ui.Generate, &QPushButton::clicked, signalMapper, &QSignalMapper::map);
The error is about map. I didn't find any example with the new syntax.
Is it overloaded ?
Thank you for help -
It is indeed overloaded.
-
So how should I write it ?
-
connect(ui.Generate, &QPushButton::clicked, signalMapper, static_cast<void(QSignalMapper::*)()>(&QSignalMapper::map));
Is it OK ?
-
@mulfycrowh
Yes, looks correct. -
Thank you
-
@mulfycrowh
You're welcome.