PDA

View Full Version : Cursor Position in scene



rogerholmes
12th March 2010, 11:13
I am trying set the postion of cursor in a scene, to place the cursor at the boundingrect.right() of a qgraphicsitem in the scene. I think I have to use the MaptoGlobal or some thing like that but qgraphicsitem does not have that map to method. in searching this fourm it seems ii have to use MaptoGlobal.... How do i get the reletive position of a point on an item in a scene in a view ?

zgulser
12th March 2010, 14:32
mapToGlobal seems ok. If not, you can catch that position( if your only concern is the mouse position) from mouseMoveEvent.

rogerholmes
12th March 2010, 15:31
zgulser,

perfect !! i would not have thought to try the moveEvent to get it.

thank you.....