Added hoverMoveEvent. The cursor should not be changed to arrow until we leave the detail area

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2015-12-06 18:20:37 +02:00
parent dfa46dc1cd
commit 178419742a
2 changed files with 8 additions and 0 deletions

View File

@ -422,6 +422,13 @@ void VToolDetail::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
QGraphicsItem::mouseReleaseEvent(event); QGraphicsItem::mouseReleaseEvent(event);
} }
//---------------------------------------------------------------------------------------------------------------------
void VToolDetail::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
{
Q_UNUSED(event);
SetOverrideCursor(cursorArrowOpenHand, 1, 1);
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VToolDetail::hoverEnterEvent(QGraphicsSceneHoverEvent *event) void VToolDetail::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{ {

View File

@ -95,6 +95,7 @@ protected:
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE; virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE;
virtual void mousePressEvent( QGraphicsSceneMouseEvent * event) Q_DECL_OVERRIDE; virtual void mousePressEvent( QGraphicsSceneMouseEvent * event) Q_DECL_OVERRIDE;
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE; virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE;
virtual void hoverMoveEvent( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE; virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE; virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE; virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE;