Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
12
14{
15 emscripten::val::global("window").call<void>("open", url.toString().toEcmaString(),
16 emscripten::val("_blank"));
17 return true;
18}
19
\inmodule QtCore
Definition qurl.h:94
QString toString(FormattingOptions options=FormattingOptions(PrettyDecoded)) const
Returns a string representation of the URL.
Definition qurl.cpp:2831
bool openUrl(const QUrl &url) override
Combined button and popup list for selecting options.
QUrl url("example.com")
[constructor-url-reference]