View Full Version : QGraphicsEllipseItem

17th July 2009, 09:00
I am developing some resizeable shapes like rectangle, circle, ellipse, polygon, arc, curve etc. rectangle works fine and even i am able to resize it with 4 corner points. but i am facing problem in ellipse.
I am developing ellipse by deriving QGraphicsEllipseItem. In this ellipse there will not be any resize points. when i move the mouse cursor(Arrow) to edge of ellipse, i need to show different cursor (resizable cursor). I cannot use rect().contain() since this function consider entire shape. cursor should change only when mouse is on edge of the ellipse..

Can anyone help me out???

Thank you. :)

17th July 2009, 09:03
then dont use rect.contains()... use QPainterPath.contains or something.. may be u can use the equation of ellipse to find the point was on the ellipse or not

17th July 2009, 09:48
Thanks for the reply.

Ya even i used shape().contains(). which is nothing but painterPath().contains(). But this also irrelevant .