Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Connecting with QSignalMapper
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 ?
Yes, looks correct.