Results 1 to 4 of 4

Thread: QGraphicsItem::hoverEnterEvent problem

  1. #1
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QGraphicsItem::hoverEnterEvent problem

    Hi,

    i'm developing a level editor for a "game". And I have a QGraphicsScene with QGraphicsPolygonItem inherit's classes. But I can't get the hoverEnterEvent to work.

    Anyone can help me?

  2. #2
    Join Date
    Jan 2007
    Location
    Rome
    Posts
    30
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QGraphicsItem::hoverEnterEvent problem

    Have you call

    Qt Code:
    1. setAcceptsHoverEvents(true);
    To copy to clipboard, switch view to plain text mode 

    on the QGraphicsPolygonItem ?

  3. #3
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsItem::hoverEnterEvent problem

    Yes, I did

    I have found the problem:

    I had insert the squares into a QGraphicsItemGroup and this makes that the squares can't use their events... Strange

    Thanks anyway

  4. #4
    Join Date
    Jan 2006
    Location
    Norway
    Posts
    124
    Thanked 38 Times in 30 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGraphicsItem::hoverEnterEvent problem

    QGraphicsItemGroup has the handlesChildEvents property enabled; it eats all events delivered to any of its descendents. You use QGraphicsItemGroup if you need to treat a group of items as one.
    Bitto / Andreas Aardal Hanssen - andreas dot aardal dot hanssen at nokia
    Nokia Software Manager, Qt Development

Similar Threads

  1. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.