QCustomPlot Discussion and Comments

QtSignals + Lambda problemReturn to overview


When using C++ Lambdas for Qt signals then equal signal names create problems:

void rangeChanged(const QCPRange &newRange);
void rangeChanged(const QCPRange &newRange, const QCPRange &oldRange); // Problem: same name

connect(chart->xAxis, &QCPAxis::rangeChanged, this, [this](const QCPRange &newRange) {

This is a general problem of Qt and the new signal&slot syntax. Also Qt classes often overload signals and slots. Some possible solutions are discussed here: