Obsolete Members for Qt
The following members of QML type Qt are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
Methods
- string atob(data)
- binding(function)
- string btoa(data)
- callLater(function, argument1, argument2, ...)
- callLater(function)
- color colorEqual(lhs, string rhs)
- object createComponent(url, mode, parent)
- object createQmlObject(qml, object parent, string filepath)
- color darker(baseColor, real factor)
- exit(retCode)
- font(fontSpecifier)
- list<string> fontFamilies()
- string formatDate(date, variant format)
- string formatDateTime(dateTime, variant format)
- string formatTime(time, variant format)
- color hsla(hue, real saturation, real lightness, real alpha)
- color hsva(hue, real saturation, real value, real alpha)
- bool isQtObject(object)
- color lighter(baseColor, real factor)
- locale(name)
- string md5(data)
- matrix4x4(m11, real m12, real m13, real m14, real m21, real m22, real m23, real m24, real m31, real m32, real m33, real m34, real m41, real m42, real m43, real m44)
- bool openUrlExternally(target)
- point point(x, int y)
- string qsTr(sourceText, string disambiguation, int n)
- string qsTrId(id, int n)
- string qsTrIdNoOp(id)
- string qsTrNoOp(sourceText, string disambiguation)
- string qsTranslate(context, string sourceText, string disambiguation, int n)
- string qsTranslateNoOp(context, string sourceText, string disambiguation)
- quaternion(scalar, real x, real y, real z)
- quit()
- rect rect(x, int y, int width, int height)
- url resolvedUrl(url)
- color rgba(red, real green, real blue, real alpha)
- size(width, int height)
- color tint(baseColor, color tintColor)
- vector2d(x, real y)
- vector3d(x, real y, real z)
- vector4d(x, real y, real z, real w)
Method Documentation
This method is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
This method should not be used. Use ECMAScript modules instead and the native JavaScript import
and export
statements instead.
Includes another JavaScript file. This method can only be used from within JavaScript files, and not regular QML files.
This imports all functions from url into the current script's namespace.
Qt.include() returns an object that describes the status of the operation. The object has a single property, status
, that is set to one of the following values:
Symbol | Value | Description |
---|---|---|
result.OK | 0 | The include completed successfully. |
result.LOADING | 1 | Data is being loaded from the network. |
result.NETWORK_ERROR | 2 | A network error occurred while fetching the url. |
result.EXCEPTION | 3 | A JavaScript exception occurred while executing the included code. An additional exception property will be set in this case. |
The status
property will be updated as the operation progresses.
If provided, callback is invoked when the operation completes. The callback is passed the same object as is returned from the Qt.include() call.