Results 1 to 7 of 7

Thread: mouseMoveEvent in QGraphicsItem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: mouseMoveEvent in QGraphicsItem

    Enable mouse tracking for the view's viewport.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Qt products
    Qt4
    Platforms
    Windows Android
    Thanks
    14
    Thanked 13 Times in 13 Posts

    Default Re: mouseMoveEvent in QGraphicsItem

    Hi,

    this problem was discussed couple of times before in the forum. For example the following,

    http://www.qtcentre.org/forum/f-qt-p...mouseMoveEvent

    but I still got the same problem with it. So good luck

  3. #3
    Join Date
    Aug 2008
    Posts
    134
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default Re: mouseMoveEvent in QGraphicsItem

    i have already used setMouseTracking() for view. but still its not working. In Qt Asistant i have checked description of setAcceptHoverEvents(). i.e.
    Hover events are commonly used to highlight an item when it's entered, and for tracking the mouse cursor as it hovers over the item (equivalent to QWidget::mouseTracking).

    But setAcceptHoverEvents() doesn't act exactly as setMouseTracking()

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: mouseMoveEvent in QGraphicsItem

    But why do you expect a hover event to trigger a mouse move event? It will trigger hoverMoveEvent()...
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. The following user says thank you to wysota for this useful post:

    navi1084 (6th July 2009)

  6. #5
    Join Date
    Aug 2008
    Posts
    134
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    10
    Thanked 3 Times in 3 Posts

    Default Re: mouseMoveEvent in QGraphicsItem

    you are absolutely correct wysota. thank you very much. then i have misunderstood the QGraphicsItem mouseMoveEvent() with QWidget mouseMoveEvent(). Because mouseMoveEvent() itself will be trigger when user hover the mouse on widget.
    My problem is solved. Thank you very much.

Similar Threads

  1. Replies: 5
    Last Post: 31st December 2010, 12:49
  2. destruction of QGraphicsItem
    By killkolor in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2009, 11:31
  3. Replies: 1
    Last Post: 25th February 2009, 01:34
  4. Snap-to grid on QGraphicsItem
    By hardgeus in forum Qt Programming
    Replies: 9
    Last Post: 28th April 2008, 17:22
  5. Replies: 6
    Last Post: 1st May 2007, 00:59

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.