map->setPixmap(aImage);
}
-void MapWindow::mouseDoubleClickEvent(QMouseEvent *event)
+// it is enough to handle mouseReleaseEvent, instead of
+// getting/creating mouseClikEvent, since the whole window
+// is occupied by only-one widget/label (image/map)
+void MapWindow::mouseReleaseEvent(QMouseEvent *event)
{
+ Q_UNUSED(event);
close();
}
MapWindow(const QPixmap &aImage, const QString &aName, QWidget *aParent = NULL);
~MapWindow() {}
protected:
- virtual void mouseDoubleClickEvent(QMouseEvent *event);
+ virtual void mouseReleaseEvent(QMouseEvent *event);
};
#endif /* MAPWINDOW_H */