mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
set mouse cursor to I-Beam shape, when hovering over text within chat
This commit is contained in:
parent
552155bd1f
commit
26768de94a
|
@ -220,10 +220,10 @@ void Text::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
|
||||||
|
|
||||||
QString anchor = doc->documentLayout()->anchorAt(event->pos());
|
QString anchor = doc->documentLayout()->anchorAt(event->pos());
|
||||||
|
|
||||||
if (!anchor.isEmpty())
|
if (anchor.isEmpty())
|
||||||
setCursor(QCursor(Qt::PointingHandCursor));
|
setCursor(Qt::IBeamCursor);
|
||||||
else
|
else
|
||||||
setCursor(QCursor());
|
setCursor(Qt::PointingHandCursor);
|
||||||
|
|
||||||
// tooltip
|
// tooltip
|
||||||
setToolTip(extractImgTooltip(cursorFromPos(event->scenePos(), false)));
|
setToolTip(extractImgTooltip(cursorFromPos(event->scenePos(), false)));
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
virtual qreal getAscent() const final;
|
virtual qreal getAscent() const final;
|
||||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) final override;
|
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) final override;
|
||||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) final override;
|
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) final override;
|
||||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event) final override;
|
void hoverMoveEvent(QGraphicsSceneHoverEvent* event) final override;
|
||||||
|
|
||||||
virtual QString getText() const final;
|
virtual QString getText() const final;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user