QPainterPath LineItem::grips() const { if (gripMode() == Move) return QPainterPath(); QPainterPath grips; grips.addPath(leftMidGrip()); grips.addPath(rightMidGrip()); return grips; }
QPainterPath LineItem::grips() const { QPainterPath grips; grips.addPath(leftMidGrip()); grips.addPath(rightMidGrip()); return grips; }
void LineItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { QGraphicsRectItem::hoverMoveEvent(event); if (isSelected()) { QPointF p = event->pos(); if ((isAllowed(RightMidGrip) && rightMidGrip().contains(p)) || (isAllowed(LeftMidGrip) && leftMidGrip().contains(p))) { view()->setCursor(Qt::CrossCursor); } else { view()->setCursor(Qt::SizeAllCursor); } } else { //view()->setCursor(Qt::SizeAllCursor); } }