Results 1 to 3 of 3

Thread: QGraphicsEllipseItem

  1. #1
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question QGraphicsEllipseItem

    Hi,
    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.

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsEllipseItem

    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

  3. #3
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QGraphicsEllipseItem

    Thanks for the reply.

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

Similar Threads

  1. Rotating QGraphicsEllipseItem, but keeping its location
    By forrestfsu in forum Qt Programming
    Replies: 2
    Last Post: 9th February 2012, 12:47
  2. text inside QGraphicsEllipseItem
    By stoned in forum Qt Programming
    Replies: 3
    Last Post: 10th June 2008, 07:44
  3. QGraphicsEllipseItem with Handles
    By stevel in forum Qt Programming
    Replies: 2
    Last Post: 17th April 2008, 00:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.