forked from qt-creator/qt-creator
Help: Add context menu to litehtml backend
Change-Id: I051984e360b41d17d32cff80fd1d4017fc81dae6 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -541,6 +541,14 @@ void QLiteHtmlWidget::leaveEvent(QEvent *event)
|
||||
viewport()->update(r.translated(-scrollPosition()));
|
||||
}
|
||||
|
||||
void QLiteHtmlWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
QPoint viewportPos;
|
||||
QPoint pos;
|
||||
htmlPos(event->pos(), &viewportPos, &pos);
|
||||
emit contextMenuRequested(event->pos(), d->documentContainer.linkAt(pos, viewportPos));
|
||||
}
|
||||
|
||||
void QLiteHtmlWidget::render()
|
||||
{
|
||||
if (!d->documentContainer.document())
|
||||
|
||||
Reference in New Issue
Block a user