diff --git a/src/libs/vtools/tools/vtooldetail.cpp b/src/libs/vtools/tools/vtooldetail.cpp index 07936d6da..63d7fc44f 100644 --- a/src/libs/vtools/tools/vtooldetail.cpp +++ b/src/libs/vtools/tools/vtooldetail.cpp @@ -113,6 +113,7 @@ VToolDetail::VToolDetail(VAbstractPattern *doc, VContainer *data, const quint32 qApp->getUndoStack()->endMacro(); } } + setAcceptHoverEvents(true); } //--------------------------------------------------------------------------------------------------------------------- @@ -405,6 +406,21 @@ void VToolDetail::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) QGraphicsItem::mouseReleaseEvent(event); } +//--------------------------------------------------------------------------------------------------------------------- +void VToolDetail::hoverEnterEvent(QGraphicsSceneHoverEvent *event) +{ + Q_UNUSED(event); + QApplication::setOverrideCursor(QCursor(cursorArrowOpenHand, 1, 1)); +} + +////--------------------------------------------------------------------------------------------------------------------- +void VToolDetail::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ + Q_UNUSED(event); + //Disable cursor-arrow-openhand + QApplication::restoreOverrideCursor(); +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief contextMenuEvent handle context menu events. diff --git a/src/libs/vtools/tools/vtooldetail.h b/src/libs/vtools/tools/vtooldetail.h index 6491b0fb5..3c84648f5 100644 --- a/src/libs/vtools/tools/vtooldetail.h +++ b/src/libs/vtools/tools/vtooldetail.h @@ -94,10 +94,13 @@ protected: virtual void RefreshDataInFile() Q_DECL_OVERRIDE; virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE; virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE; + virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE; + virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE; virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE; virtual void RemoveReferens() Q_DECL_OVERRIDE; virtual void keyReleaseEvent(QKeyEvent * event) Q_DECL_OVERRIDE; virtual void SetVisualization() Q_DECL_OVERRIDE {} + private: Q_DISABLE_COPY(VToolDetail) /** @brief dialog dialog options. */