45 explicit QgsWebView( QWidget *parent =
nullptr )
46 : QTextBrowser( parent )
50 connect(
this, &QTextBrowser::anchorClicked,
this, &QgsWebView::linkClicked );
51 connect(
this, &QgsWebView::pageLoadFinished, mPage, &QWebPage::loadFinished );
60 void setUrl(
const QUrl &url )
65 void load(
const QUrl &url )
85 virtual QgsWebView *createWindow( QWebPage::WebWindowType )
90 void setContent(
const QByteArray &data,
const QString &contentType,
const QUrl & )
92 QString text = QString::fromUtf8( data );
93 if ( contentType ==
"text/html" )
98 emit pageLoadFinished(
true );
101 void print( QPrinter * )
106 void linkClicked(
const QUrl &link );
108 void pageLoadFinished(
bool ok );
112 void setHtml(
const QString &text )
114 QTextBrowser::setHtml( text );
115 emit pageLoadFinished(
true );
118 void setText(
const QString &text )
120 QTextBrowser::setText( text );
121 emit pageLoadFinished(
true );
A collection of stubs to mimic the API of a QWebPage on systems where QtWebkit is not available.