link hover

This commit is contained in:
Martin Rotter 2022-03-26 10:43:37 +01:00
parent d6dd8494b4
commit c666ab062f
2 changed files with 4 additions and 1 deletions

View File

@ -27,6 +27,9 @@ void LiteHtmlViewer::bindToBrowser(WebBrowser* browser) {
browser->m_actionStop = new QAction(this);
connect(this, &LiteHtmlViewer::zoomFactorChanged, browser, &WebBrowser::onZoomFactorChanged);
connect(this, &LiteHtmlViewer::linkHighlighted, browser, [browser](const QUrl& url) {
browser->onLinkHovered(url.toString());
});
// TODO: změna ikon, změna stavu akcí.
@ -39,7 +42,6 @@ void LiteHtmlViewer::bindToBrowser(WebBrowser* browser) {
connect(this, &WebEngineViewer::iconChanged, browser, &WebBrowser::onIconChanged);
connect(page(), &WebEnginePage::windowCloseRequested, browser, &WebBrowser::closeRequested);
connect(page(), &WebEnginePage::linkHovered, browser, &WebBrowser::onLinkHovered);
*/
}

View File

@ -286,6 +286,7 @@ void WebEngineViewer::bindToBrowser(WebBrowser* browser) {
browser->m_actionReload = pageAction(QWebEnginePage::WebAction::Reload);
browser->m_actionStop = pageAction(QWebEnginePage::WebAction::Stop);
connect(this, &WebEngineViewer::zoomFactorChanged, browser, &WebBrowser::onZoomFactorChanged);
connect(this, &WebEngineViewer::urlChanged, browser, &WebBrowser::updateUrl);
connect(this, &WebEngineViewer::loadStarted, browser, &WebBrowser::onLoadingStarted);
connect(this, &WebEngineViewer::loadProgress, browser, &WebBrowser::onLoadingProgress);