Results 1 to 2 of 2

Thread: How i can detect intersects line shape with rect on qgraphicsscene

  1. #1
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Question How i can detect intersects line shape with rect on qgraphicsscene

    Hello. How i can detect intersection line shape with rect on qgraphicsscene? I know how to do it only with line boundingrect.
    Line inherited from QGraphicsItem

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How i can detect intersects line shape with rect on qgraphicsscene

    Not sure what you mean.
    QGraphicsScene has not visual representation, and thus it cannot intersect with anything.
    From the docs:
    Note that QGraphicsScene has no visual appearance of its own; it only manages the items.
    You can create a simple item to cover the all the size of the space you are interested in and make it the root parent of all the other objects in your scene.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Change QGraphicsScene Rect by dragging QGraphicItems
    By airglide in forum Qt Programming
    Replies: 1
    Last Post: 8th December 2012, 18:36
  2. Replies: 2
    Last Post: 1st October 2011, 09:11
  3. Replies: 3
    Last Post: 5th February 2011, 07:31
  4. Replies: 1
    Last Post: 13th August 2008, 16:27
  5. How to detect new line?
    By whoops.slo in forum Newbie
    Replies: 6
    Last Post: 6th January 2006, 17:02

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.