Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qwasmservices.cpp
Go to the documentation of this file.
1
// Copyright (C) 2018 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4
#include "
qwasmservices.h
"
5
6
#include <QtCore/QUrl>
7
#include <QtCore/QDebug>
8
9
#include <emscripten/val.h>
10
11
QT_BEGIN_NAMESPACE
12
13
bool
QWasmServices::openUrl
(
const
QUrl
&
url
)
14
{
15
emscripten::val::global(
"window"
).call<
void
>(
"open"
,
url
.
toString
().toJsString(),
16
emscripten::val(
"_blank"
));
17
return
true
;
18
}
19
20
QT_END_NAMESPACE
QUrl
\inmodule QtCore
Definition
qurl.h:94
QUrl::toString
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
Definition
qurl.cpp:2828
QWasmServices::openUrl
bool openUrl(const QUrl &url) override
Definition
qwasmservices.cpp:13
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
qwasmservices.h
url
QUrl url("example.com")
[constructor-url-reference]
Definition
src_corelib_io_qurl.cpp:19
qtbase
src
plugins
platforms
wasm
qwasmservices.cpp
Generated by
1.9.7