I'm trying to connect a signal from a timer to a class I've created, that inherits QGLWidget
. When I connect it the old way, it works -
connect(m_pTickTimer, SIGNAL(timeout()), this, SLOT(update()));
But when I try the new way -
connect(m_pTickTimer, &QTimer::timeout, this, &imageDisplay::update);
I get a compilation error
-
error: no matching function for call to
'imageDisplay::connect(QTimer*&, void (QTimer::*)(QTimer::QPrivateSignal), imageDisplay*, <unresolved overloaded function type>)'
Is it because I don't override the update()
slot in my class?