mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 16:54:08 +00:00
16 lines
404 B
C++
16 lines
404 B
C++
|
#include "articlewebpage.h"
|
||
|
|
||
|
ArticleWebPage::ArticleWebPage(QObject *parent)
|
||
|
: QWebEnginePage{parent}
|
||
|
{
|
||
|
}
|
||
|
bool ArticleWebPage::acceptNavigationRequest( const QUrl & url, NavigationType type, bool isMainFrame )
|
||
|
{
|
||
|
if( type == QWebEnginePage::NavigationTypeLinkClicked )
|
||
|
{
|
||
|
emit linkClicked( url );
|
||
|
return true;
|
||
|
}
|
||
|
return QWebEnginePage::acceptNavigationRequest( url, type, isMainFrame );
|
||
|
}
|