Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qmlglobalobject.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2023 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
/*!
4
\page qtqml-javascript-qmlglobalobject.html
5
\meta {keywords} {qmltopic}
6
\title QML Global Object
7
\brief Description of the Qml Global Object
8
9
10
The QML JavaScript host environment implements the following host objects and functions.
11
They are built-in, so you can use them from any JavaScript code loaded in QML, without
12
additional imports:
13
14
\list
15
\li The \l{QmlGlobalQtObject}{Qt object}: A QML object that offers helper methods
16
and properties specific to the QML environment.
17
\li \l {Qt::}{qsTr()}, \l {Qt::}{qsTranslate()}, \l {Qt::}{qsTrId()}, \l {Qt::}{QT_TR_NOOP()()},
18
\l {Qt::}{QT_TRANSLATE_NOOP()}, \l {Qt::}{QT_TRID_NOOP()} functions:
19
QML functions that let you translate \l{Mark Strings for Translation}
20
{strings} and \l{Mark Translatable Data Text Strings}{string literals} in the
21
QML environment.
22
\li gc() function: A QML function that manually triggers garbage collection.
23
\li print() function: A QML function that prints output to the console.
24
\li The \l{Console API}{console object}: Implements a subset of the
25
\l{http://getfirebug.com/wiki/index.php/Console_API}{FireBug Console API}.
26
\li \l{The XMLHttpRequest JavaScript Object}{XMLHttpRequest}, DOMException: Implements a subset of the
27
\l{http://www.w3.org/TR/XMLHttpRequest/}{W3C XMLHttpRequest specification}.
28
\endlist
29
30
\note You cannot use the \l {QJSEngine::}{globalObject()} function to change
31
the global object of a \l QQmlEngine. For more information, see
32
\l {JavaScript Environment Restrictions}.
33
34
*/
qtdeclarative
src
qml
doc
src
javascript
qmlglobalobject.qdoc
Generated on
for Qt by
1.16.1