Results 1 to 2 of 2

Thread: mouse selection of overlapping ellipses

  1. #1
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default mouse selection of overlapping ellipses

    I am drawing ellipses using Graphics item in a window (with image in background) and aim to select ellipses using mouse clicks. However, it is not possible for me to select ellipses when they are overlapping. For example, if several ellipses overlap, I can only select the one which is bigger, not the one which are smaller and are (supposedly) inside the bigger ellipse. Can anyone provide some suggestions?

    The problem is somewhat related to this http://www.qtcentre.org/threads/3737...o-mouse-events but I can not understand the suggestion on this forum well.

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: mouse selection of overlapping ellipses

    I don't have experience of this, but http://doc.qt.nokia.com/latest/qgrap...ousePressEvent says:
    "If you call QEvent::ignore() on event, this item will lose the mouse grab, and event will propagate to any topmost item beneath."

    So, in principle the graphics items behave differently than widgets and should not have any problems, except the user interface issue of how to handle the clicking further down into the stack until the correct object is found.

Similar Threads

  1. How to enlarge the grap mouse selection
    By matteo.boscolo in forum Qt Programming
    Replies: 4
    Last Post: 13th August 2010, 14:10
  2. Question about how to do a mouse selection box
    By aarelovich in forum Qt Programming
    Replies: 2
    Last Post: 10th July 2010, 13:01
  3. drawing series of rotated ellipses
    By qtn00b in forum Newbie
    Replies: 1
    Last Post: 17th December 2009, 01:51
  4. Dragging mouse selection in QTableWidget
    By yartov in forum Qt Programming
    Replies: 1
    Last Post: 12th April 2008, 15:03
  5. overlapping canvases
    By quickNitin in forum Newbie
    Replies: 11
    Last Post: 8th October 2006, 11:22

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.