Hi Conny,

At present the best way to do this would be to subclass QGraphicsGeoMap and 
override the event handlers for the mouse.  The MapViewer example does this if 
you want a starting point.

Once you have the position of the mouse click you can use 
QGraphicsGeoMap::objectsAtScreenPosition to work out if your POI was clicked.

Some circumstances have changed a little since we decided to do behaviour 
modification through overriding event handlers - we're currently wondering if 
there's a sensible way to have platform-map-default-behaviour out of the box 
(while still being customizable for those who need it).  If we can do that in a 
BC manner we'll put it on our list.

As well as this, we'll most likely have both map wide and per object mouse 
handling in the final Maps QML - as long as I can cobble together the requisite 
magic :)

Cheers,

Dave

> -----Original Message-----
> From: qt-mobility-feedback-boun...@trolltech.com [mailto:qt-mobility-
> feedback-boun...@trolltech.com] On Behalf Of ext Cornelius Hald
> Sent: Wednesday, 10 November 2010 2:21 AM
> To: qt-mobility-feedback@trolltech.com
> Subject: [Qt-mobility-feedback] Clickable map object (Qt Mobility 1.1)
> 
> Hi,
> 
> I know it's currently not possible to properly work with map objects
> through QML, but is there a way to create clickable map objects using C
> ++?
> 
> I want to draw some POIs on the map and if the user clicks them I need
> to get a signal. I'm willing to implement this part using C++, but I
> can't find a way to do it.
> 
> Please let me know if it's possible and if not, whether or not it's
> planned for 1.1 final.
> 
> Thanks a lot!
> Conny
> 
> 
> 
> _______________________________________________
> Qt-mobility-feedback mailing list
> Qt-mobility-feedback@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-mobility-feedback

_______________________________________________
Qt-mobility-feedback mailing list
Qt-mobility-feedback@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-mobility-feedback

Reply via email to