71 explicit QgsWebView( QWidget *parent =
nullptr )
72 : QTextBrowser( parent )
76 connect(
this, &QTextBrowser::anchorClicked,
this, &QgsWebView::linkClicked );
77 connect(
this, &QgsWebView::pageLoadFinished, mPage, &QWebPage::loadFinished );
86 void setUrl(
const QUrl &url )
91 void load(
const QUrl &url )
106 virtual QgsWebView *createWindow( QWebPage::WebWindowType )
111 void setContent(
const QByteArray &data,
const QString &contentType,
const QUrl & )
113 QString text = QString::fromUtf8( data );
114 if ( contentType ==
"text/html" )
117 setPlainText( text );
119 emit pageLoadFinished(
true );
122 void print( QPrinter * )
127 void linkClicked(
const QUrl &link );
129 void pageLoadFinished(
bool ok );
133 void setHtml(
const QString &text )
135 QTextBrowser::setHtml( text );
136 emit pageLoadFinished(
true );
139 void setText(
const QString &text )
141 QTextBrowser::setText( text );
142 emit pageLoadFinished(
true );
The QWebPage class is a collection of stubs to mimic the API of a QWebPage on systems where QtWebkit ...