Hi. I'm subclassing a QGraphicsItem, but I can't recieve the hover events. I'm forgoting anything?

The code is below

Qt Code:
  1. #include "square.h"
  2.  
  3. #include <QtGui>
  4.  
  5. Square::Square(QPolygonF &polygon, uint row, uint col){
  6. m_polygon=polygon;
  7. m_row=row; m_col=col;
  8. m_hover=false;
  9. setAcceptsHoverEvents(true);
  10. }
  11.  
  12. QRectF Square::boundingRect() const{
  13. return m_polygon.boundingRect();
  14. }
  15.  
  16. void Square::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*){
  17. if(m_hover) painter->setBrush(Qt::red);
  18. painter->drawPolygon(m_polygon);
  19. painter->drawText(boundingRect(), QString("%1x%2").arg(m_row).arg(m_col));
  20. }
  21.  
  22. void Square::hoverEnterEvent(QGraphicsSceneHoverEvent*){
  23. m_hover=true;
  24. }
  25.  
  26. void Square::hoverLeaveEvent(QGraphicsSceneHoverEvent*){
  27. m_hover=false;
  28. }
To copy to clipboard, switch view to plain text mode 

Thanks, bye