Em... The initial position is hardly 0,0... Look at the picture attached. Black dots are points.
Em... The initial position is hardly 0,0... Look at the picture attached. Black dots are points.
Hi Kefir,
you should use scenePos() to get the position of your items AFIK the pos() method will return 0,0 i.e origin of the item itself in local coordinates. Though Qt documentation says that a parent less item will return position coordinates in terms of Scene. From the code and snap shot it seems that you are developing a GIS application. I would appreciate if you could share some information on your application I am also into GIS application development.
With regards
Sukesh
Thank you, Sukesh!
But I have doubts that pos() returns origin of the item, as it... But I'll try thinking in this direction...Returns the position of the item in parent coordinates. If the item has no parent, its position is given in scene coordinates.
Actually it is GIS API. So far I succesfully load google/openstreet/yandex and GeoServer tiles, zoom in/out, add features by coordinate. I'm afraid I can't give you my sources as this development is for my company and it is not opensource. However I answer some questions and give you links that may help you)
Bookmarks