44 explicit QgsWebView( QWidget *parent =
nullptr )
45 : QTextBrowser( parent )
49 connect(
this, &QTextBrowser::anchorClicked,
this, &QgsWebView::linkClicked );
50 connect(
this, &QgsWebView::pageLoadFinished, mPage, &QWebPage::loadFinished );
59 void setUrl(
const QUrl &url )
64 void load(
const QUrl &url )
84 virtual QgsWebView *createWindow( QWebPage::WebWindowType )
89 void setContent(
const QByteArray &data,
const QString &contentType,
const QUrl & )
91 QString text = QString::fromUtf8( data );
92 if ( contentType ==
"text/html" )
97 emit pageLoadFinished(
true );
100 void print( QPrinter * )
105 void linkClicked(
const QUrl &link );
107 void pageLoadFinished(
bool ok );
111 void setHtml(
const QString &text )
113 QTextBrowser::setHtml( text );
114 emit pageLoadFinished(
true );
117 void setText(
const QString &text )
119 QTextBrowser::setText( text );
120 emit pageLoadFinished(
true );
A collection of stubs to mimic the API of a QWebPage on systems where QtWebkit is not available.