summaryrefslogtreecommitdiffstats
path: root/src/webview/qquickwebview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview/qquickwebview.cpp')
-rw-r--r--src/webview/qquickwebview.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/webview/qquickwebview.cpp b/src/webview/qquickwebview.cpp
index 898154e..4441df4 100644
--- a/src/webview/qquickwebview.cpp
+++ b/src/webview/qquickwebview.cpp
@@ -101,6 +101,7 @@ QQuickWebView::QQuickWebView(QQuickItem *parent)
connect(m_webView, &QWebView::loadingChanged, this, &QQuickWebView::onLoadingChanged);
connect(m_webView, &QWebView::requestFocus, this, &QQuickWebView::onFocusRequest);
connect(m_webView, &QWebView::javaScriptResult, this, &QQuickWebView::onRunJavaScriptResult);
+ connect(m_webView, &QWebView::httpUserAgentChanged, this, &QQuickWebView::httpUserAgentChanged);
}
QQuickWebView::~QQuickWebView()
@@ -108,6 +109,24 @@ QQuickWebView::~QQuickWebView()
}
/*!
+ \qmlproperty url QtWebView::WebView::httpUserAgent
+ \since QtWebView 1.14
+ The user agent in use.
+
+ \note on WinRT, this property affects all WebViews of the application.
+*/
+
+void QQuickWebView::setHttpUserAgent(const QString &userAgent)
+{
+ m_webView->setHttpUserAgent(userAgent);
+}
+
+QString QQuickWebView::httpUserAgent() const
+{
+ return m_webView->httpUserAgent();
+}
+
+/*!
\qmlproperty url QtWebView::WebView::url
The URL of currently loaded web page. Changing this will trigger