Commit 5ee27816 authored by Alexander Semke's avatar Alexander Semke

Show the pointer hand cursor when hovering over a URL in a markdown

entry.
parent ddf8dbf5
......@@ -60,6 +60,14 @@ WorksheetTextItem::WorksheetTextItem(QGraphicsObject* parent, Qt::TextInteractio
m_size = document()->size();;
setAcceptDrops(true);
setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
connect(this, &QGraphicsTextItem::linkHovered, [=](const QString& link) {
if (!link.isEmpty())
QApplication::setOverrideCursor(QCursor(Qt::PointingHandCursor));
else
QApplication::restoreOverrideCursor();
});
connect(document(), SIGNAL(contentsChanged()), this, SLOT(testSize()));
connect(this, SIGNAL(menuCreated(QMenu*,QPointF)), parent,
SLOT(populateMenu(QMenu*,QPointF)), Qt::DirectConnection);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment