Given the following two:
connect(ui->comboBox, SIGNAL(activated(QString)), ps, SLOT(requestPlotsAvailable(QString)));
connect(ui->comboBox, &QComboBox::activated, ps, &PlotSystem::requestPlotsAvailable);
The first uses the old notation, which works. The second uses the new notation and gives the error
error: no matching function for call to 'PlotSystemGui::connect(QComboBox*&, <unresolved overloaded function type>)'
How to avoid the error using the new notation?
This should work
Qt 5.7 introduces
qOverload
(or QOverload for C++11) for convenience/readability:See this question about pointers to overloaded functions