Results 1 to 4 of 4

Thread: Outlining a group of QGraphicsItems in a Scene

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2009
    Posts
    33
    Thanks
    5
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Outlining a group of QGraphicsItems in a Scene

    Hello all,

    I am looking for a way to obtain the outline, shape(), of several QGraphicsItems that may or may not be overlapping. They are all children of a single QGraphicsItem for which I currently am drawing the boundingRect(). I computed this rectangle from the union of all of the boundingRect() of the child items; so I figured, instead of this large square I can somehow get the shape of all of the child items combined.

    If the group of items looks like attached pic (someItemSet.png),
    then I want my shape to look like this attached pic (someSetShape.png).


    For simplicity, assume squares of the same size that do not change. It does not have to be so perfect or curvy, that is just how I drew it in Gimp; but, it could form any shape based on the data for the items.

    I know about QPainterPath and QPainterPathStroker but can't quite come up with the algorithm. Maybe I'm too tired or maybe it is because of Friday.

    any general suggestions?


    JW
    Attached Images Attached Images

Similar Threads

  1. Copy and Paste of QGraphicsItems in a Scene
    By subash in forum Qt Programming
    Replies: 6
    Last Post: 6th July 2011, 15:15
  2. Replies: 1
    Last Post: 10th September 2008, 16:49
  3. How to make a list of QGraphicsItems on the scene
    By Holy in forum Qt Programming
    Replies: 8
    Last Post: 10th June 2008, 13:43
  4. Creating new scene from a part of an old one
    By maverick_pol in forum Qt Programming
    Replies: 6
    Last Post: 28th November 2007, 18:14
  5. Creating a scene from piece of another scene
    By maverick_pol in forum Qt Programming
    Replies: 3
    Last Post: 23rd August 2007, 17:51

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.