diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-16 01:00:11 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-16 11:20:42 +0100 |
commit | 0a4e5bb265c4a2345a9cbffab1b5150124b8d31e (patch) | |
tree | b243668d53f710af3d57a44c18e1ed0c40b100f7 /src/plugins/platforms/wasm/qwasmcursor.cpp | |
parent | 4772a2da15ae0624633f3fc4d029d5f0e1e33892 (diff) | |
parent | bd828bacb982a51ee21f03487f8390cfc96cc6d3 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
src/widgets/kernel/qshortcut.cpp
tests/auto/network/access/spdy/tst_spdy.cpp
Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcursor.cpp')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmcursor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcursor.cpp b/src/plugins/platforms/wasm/qwasmcursor.cpp index 28ec3b58dd..c04fa6441a 100644 --- a/src/plugins/platforms/wasm/qwasmcursor.cpp +++ b/src/plugins/platforms/wasm/qwasmcursor.cpp @@ -36,6 +36,8 @@ #include <emscripten/emscripten.h> #include <emscripten/bind.h> +using namespace emscripten; + void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window) { if (!windowCursor || !window) @@ -54,8 +56,10 @@ void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window) htmlCursorName = "auto"; // Set cursor on the canvas - QString canvasId = QWasmScreen::get(screen)->canvasId(); - emscripten::val canvasStyle = emscripten::val::global(canvasId.toUtf8().constData())["style"]; + QByteArray canvasId = QWasmScreen::get(screen)->canvasId().toUtf8(); + val document = val::global("document"); + val canvas = document.call<val>("getElementById", val(canvasId.constData())); + val canvasStyle = canvas["style"]; canvasStyle.set("cursor", emscripten::val(htmlCursorName.constData())); } |