1
0
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:
Nils Fenner 2015-12-30 14:45:55 +01:00
parent 552155bd1f
commit 26768de94a
No known key found for this signature in database
GPG Key ID: 9591A163FF9BE04C
2 changed files with 4 additions and 4 deletions

View File

@ -220,10 +220,10 @@ void Text::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
QString anchor = doc->documentLayout()->anchorAt(event->pos());
if (!anchor.isEmpty())
setCursor(QCursor(Qt::PointingHandCursor));
if (anchor.isEmpty())
setCursor(Qt::IBeamCursor);
else
setCursor(QCursor());
setCursor(Qt::PointingHandCursor);
// tooltip
setToolTip(extractImgTooltip(cursorFromPos(event->scenePos(), false)));

View File

@ -54,7 +54,7 @@ public:
virtual qreal getAscent() const final;
virtual void mousePressEvent(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;