diff options
Diffstat (limited to 'src/webview')
| -rw-r--r-- | src/webview/doc/qtwebview.qdocconf | 2 | ||||
| -rw-r--r-- | src/webview/qquickwebview.cpp | 4 | ||||
| -rw-r--r-- | src/webview/qwebview_android.cpp | 5 | ||||
| -rw-r--r-- | src/webview/qwebview_winrt.cpp | 5 |
4 files changed, 13 insertions, 3 deletions
diff --git a/src/webview/doc/qtwebview.qdocconf b/src/webview/doc/qtwebview.qdocconf index ae7e25c..96cf19e 100644 --- a/src/webview/doc/qtwebview.qdocconf +++ b/src/webview/doc/qtwebview.qdocconf @@ -35,7 +35,7 @@ exampledirs += ../../../examples/webview imagedirs += images examplesinstallpath = webview -depends = qtcore qtdoc qtquick qtqml +depends = qtcore qtdoc qtgui qtquick qtqml Cpp.ignoretokens += Q_WEBVIEW_EXPORT diff --git a/src/webview/qquickwebview.cpp b/src/webview/qquickwebview.cpp index 1729f83..d760564 100644 --- a/src/webview/qquickwebview.cpp +++ b/src/webview/qquickwebview.cpp @@ -82,6 +82,10 @@ Q_GLOBAL_STATIC(CallbackStorage, callbacks) APIs on the platforms where this is available, thus it does not necessarily require including a full web browser stack as part of the application. + To make the Qt WebView module function correctly across all platforms, it is necessary + to call \l {qtwebview-initialize}{QtWebView::initialize}() right after creating the + QGuiApplication instance. + \note Due to platform limitations overlapping the WebView and other QML components is not supported. */ diff --git a/src/webview/qwebview_android.cpp b/src/webview/qwebview_android.cpp index 54f6a3d..1783deb 100644 --- a/src/webview/qwebview_android.cpp +++ b/src/webview/qwebview_android.cpp @@ -401,6 +401,11 @@ static void c_onReceivedError(JNIEnv *env, JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* /*reserved*/) { + static bool initialized = false; + if (initialized) + return JNI_VERSION_1_6; + initialized = true; + typedef union { JNIEnv *nativeEnvironment; void *venv; diff --git a/src/webview/qwebview_winrt.cpp b/src/webview/qwebview_winrt.cpp index eb78439..5895ec4 100644 --- a/src/webview/qwebview_winrt.cpp +++ b/src/webview/qwebview_winrt.cpp @@ -45,6 +45,7 @@ #include <QScreen> #include <qfunctions_winrt.h> #include <private/qeventdispatcher_winrt_p.h> +#include <private/qhighdpiscaling_p.h> #include <wrl.h> #include <windows.graphics.display.h> @@ -488,8 +489,8 @@ void QWinRTWebViewPrivate::setGeometry(const QRect &geometry) const QScreen *screen = d->window->screen(); Q_ASSERT(screen); const QPoint screenTopLeft = screen->availableGeometry().topLeft(); - const QPointF topLeft = QPointF(geometry.topLeft() + screenTopLeft) * scaleFactor; - const QSizeF size = QSizeF(geometry.size()) * scaleFactor; + const QPointF topLeft = QHighDpi::toNativePixels(QPointF(geometry.topLeft() + screenTopLeft) * scaleFactor, screen); + const QSizeF size = QHighDpi::toNativePixels(QSizeF(geometry.size()) * scaleFactor, screen); #else ResolutionScale resolutionScale; hr = d->displayInformation->get_ResolutionScale(&resolutionScale); |
