Qt 6.11 is out! See what's new in the release
blog
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 ?
-
connect(ui.Generate, &QPushButton::clicked, signalMapper, static_cast<void(QSignalMapper::*)()>(&QSignalMapper::map));Is it OK ?
@mulfycrowh
Yes, looks correct. -
Thank you
-
Thank you
@mulfycrowh
You're welcome.