Results 1 to 2 of 2

Thread: QGraphicsItem covering another

  1. #1
    Join Date
    Apr 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QGraphicsItem covering another

    Hello,

    i have two polygon graphicsitems on a graphicsscene.
    the polygons have a border.
    in some cases one polygon completely covers the other polygon.
    is it possible to make just the borders of the polygons clickable,
    so that i can select the other underlying polygon?
    in other words, make the fillarea of the polygon not accesible for mouseclicks, just the border.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: QGraphicsItem covering another

    You need to reimplement QGraphicsItem::shape () and give only the border of your item back.

Similar Threads

  1. QGraphicsItem doesn't inherit QObject?
    By xyzt in forum Qt Programming
    Replies: 6
    Last Post: 26th September 2011, 15:59
  2. destruction of QGraphicsItem
    By killkolor in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2009, 11:31
  3. Replies: 1
    Last Post: 25th February 2009, 01:34
  4. QGraphicsItem does not update
    By zgulser in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2009, 15:44
  5. QGraphicsItem force boundingRect
    By bunjee in forum Qt Programming
    Replies: 0
    Last Post: 27th September 2008, 17:49

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
  •  
Qt is a trademark of The Qt Company.