Hey @all,

i'm trying to get the hover effect working for my QGraphicsLineItem object.
I have subclassed the QGraphicsLineItem class, and in the constructor i wrote:
Qt Code:
  1. setAcceptHoverEvents(true);
To copy to clipboard, switch view to plain text mode 

I implemented the protected functions like below:
Qt Code:
  1. void Arrow::hoverEnterEvent(QGraphicsSceneHoverEvent * event) {
  2. //QGraphicsLineItem::hoverEnterEvent(event);
  3. qDebug() << "void Arrow::hoverEnterEvent(QGraphicsSceneHoverEvent * event)";
  4. pen().setColor(QColor(204, 0, 255, 76));
  5. }
  6.  
  7. void Arrow::hoverLeaveEvent(QGraphicsSceneHoverEvent * event) {
  8. qDebug() << "void Arrow::hoverLeaveEvent(QGraphicsSceneHoverEvent * event)";
  9. pen().setColor(myColor);
  10. }
To copy to clipboard, switch view to plain text mode 

But when i come over the line with my mouse pointer the functions doesn't be executed?

What i'am doing wrong? Can anybody help me.

Regards
NoRUlez