Results 1 to 3 of 3

Thread: Item::contains problem with coordinates

  1. #1
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows
    Thanks
    75
    Thanked 24 Times in 21 Posts

    Default Item::contains problem with coordinates

    I have some QGraphicsPixmapItem in Scene and i want to use 'Contains' function to findout if mouse is on item. But the coordinates are locally on items . How can i translate them to Scene Coordinates?

  2. #2
    Join Date
    Feb 2011
    Posts
    354
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows
    Thanks
    17
    Thanked 27 Times in 24 Posts

    Default Re: Item::contains problem with coordinates

    maybe it worth to try isUnderMouse()

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

    alizadeh91 (16th March 2012)

  4. #3
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows
    Thanks
    75
    Thanked 24 Times in 21 Posts

    Default Re: Item::contains problem with coordinates

    Thanks That Worked

Similar Threads

  1. Replies: 1
    Last Post: 28th July 2011, 12:28
  2. QGraphicsView, QGraphicsScene item coordinates in scene
    By harakiri in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2010, 11:02
  3. QGraphicsView coordinates system problem
    By Oximoron in forum Newbie
    Replies: 1
    Last Post: 27th April 2010, 17:26
  4. Replies: 4
    Last Post: 18th March 2010, 11:11
  5. Replies: 1
    Last Post: 26th September 2006, 06:38

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.