Results 1 to 2 of 2

Thread: Change cursor only if the mouse is over an really visible QGraphicsItem

  1. #1
    Join Date
    May 2009
    Posts
    21
    Thanks
    4
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Change cursor only if the mouse is over an really visible QGraphicsItem

    Hi,

    I've reimplemented drawForeground() in a sub class of QGraphicsView. So part of the shown QGraphicsScene is visually overlaid (invisible).

    Now I want to display a special cursor shape if the mouse cursor is over a QGraphicsItem. For this I can use setCursor(...). The Problem is that in this case the mouse cursor gets changed although the item is not visible cause its beneath the foreground drawings.

    Is there a way to change the cursor only if the item is really visible.

    Thank you in advance

    Markus

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Change cursor only if the mouse is over an really visible QGraphicsItem

    How about using a real item for the overlay?
    J-P Nurmi

Similar Threads

  1. QGraphicsItem no mouse events called
    By munna in forum Qt Programming
    Replies: 11
    Last Post: 9th December 2009, 15:43
  2. QGraphicsItem mouse out of focus
    By bunjee in forum Qt Programming
    Replies: 3
    Last Post: 25th June 2009, 12:45
  3. how to prevent qgraphicsitem repaint while mouse move on it
    By christina123y in forum Qt Programming
    Replies: 22
    Last Post: 17th April 2009, 11:17
  4. QGraphicsItem mouse events
    By zgulser in forum Qt Programming
    Replies: 13
    Last Post: 11th February 2009, 12:19
  5. Replies: 9
    Last Post: 22nd June 2008, 23:26

Tags for this Thread

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.