Results 1 to 2 of 2

Thread: Newbie: GraphicsView Framework

  1. #1
    Join Date
    Sep 2008
    Posts
    18
    Thanks
    12
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question Newbie: GraphicsView Framework

    I know this is probably a stupid question, but if you put say two QGraphicsPixmapItems into a scene and you view it with QGraphicsView, how do you keep the Items from overlapping?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Newbie: GraphicsView Framework

    You are the one who places items in the scene, and u have to make sure that they dont overlap.
    You can however check if the item collides with another item using QGraphicsItem::collidingItems .

    And if you know the size of items before hand, you can use QGraphicsItem::setPos to place the items in the scene

  3. The following user says thank you to aamer4yu for this useful post:

    RY (2nd October 2008)

Similar Threads

  1. Newbie: Circuits and GraphicsView
    By RY in forum Newbie
    Replies: 10
    Last Post: 1st October 2008, 06:12

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.