In Qt if the signal is not overloaded it can be passed to the connect method like this.
QObject::connect(comboBox, &QComboBox::currentTextChanged, [&]()-> void {});
But if the signal is overloaded then it can be done in two steps.
Example:
In Qt's QComboBox class the highlighted method is overloaded
void QComboBox::highlighted(int index)
void QComboBox::highlighted(const QString & text)
When using the QObject::connect we can declare the pointer to member function variable and then use it which requires 2 steps.
void (QComboBox::*fptr) (int) = &QComboBox::highlighted;
QObject::connect(comboBox, fptr, [&]()-> void {
insertWidgetToMapAndSend(listView);
});
Is it possible to pass the overloaded method without the declaration of ftptr ?