I'm developing in Qt with C++. I have displayed a map and want to be able to register when the mouse clicks on a location on the map. in my class .cpp file I have tried including the mouseClicked(QMouseEvent *event), but this is never called when I click.
Display_a_map.cpp
void Display_a_map::mouseClicked(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton) {
qDebug() << "testing";
}
}