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
\title QML Global Object
6
\brief Description of the Qml Global Object
7
8
9
The QML JavaScript host environment implements the following host objects and functions.
10
They are built-in, so you can use them from any JavaScript code loaded in QML, without
11
additional imports:
12
13
\list
14
\li The \l{QmlGlobalQtObject}{Qt object}: A QML object that offers helper methods
15
and properties specific to the QML environment.
16
\li \l {Qt::}{qsTr()}, \l {Qt::}{qsTranslate()}, \l {Qt::}{qsTrId()}, \l {Qt::}{QT_TR_NOOP()()},
17
\l {Qt::}{QT_TRANSLATE_NOOP()}, \l {Qt::}{QT_TRID_NOOP()} functions:
18
QML functions that let you translate \l{Mark Strings for Translation}
19
{strings} and \l{Mark Translatable Data Text Strings}{string literals} in the
20
QML environment.
21
\li gc() function: A QML function that manually triggers garbage collection.
22
\li print() function: A QML function that prints output to the console.
23
\li The \l{Console API}{console object}: Implements a subset of the
24
\l{http://getfirebug.com/wiki/index.php/Console_API}{FireBug Console API}.
25
\li \l{XMLHttpRequest}, DOMException: Implements a subset of the
26
\l{http://www.w3.org/TR/XMLHttpRequest/}{W3C XMLHttpRequest specification}.
27
\endlist
28
29
\note You cannot use the \l {QJSEngine::}{globalObject()} function to change
30
the global object of a \l QQmlEngine. For more information, see
31
\l {JavaScript Environment Restrictions}.
32
33
*/
qtdeclarative
src
qml
doc
src
javascript
qmlglobalobject.qdoc
Generated on
for Qt by
1.14.0