IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QML Global Object

Description of the Qml Global Object.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QML Global Object

The QML JavaScript host environment implements the following host objects and functions. These are built in and can be used from any JavaScript code loaded in QML, without additional imports:

The globalObject() function cannot be used to modify the global object of a QQmlEngine. For more information about this, see JavaScript Environment Restrictions.

XMLHttpRequest

The XMLHttpRequest object, which can be used to asynchronously obtain data from over a network.

The XMLHttpRequest API implements the same W3C standard as many popular web browsers with following exceptions:

  • QML's XMLHttpRequest does not enforce the same origin policy.

Additionally, the responseXML XML DOM tree currently supported by QML is a reduced subset of the DOM Level 3 Core API supported in a web browser. The following objects and properties are supported by the QML implementation:

Node

Document

Element

Attr

CharacterData

Text

  • nodeName

  • nodeValue

  • nodeType

  • parentNode

  • childNodes

  • firstChild

  • lastChild

  • previousSibling

  • nextSibling

  • attributes

  • xmlVersion

  • xmlEncoding

  • xmlStandalone

  • documentElement

  • tagName

  • name

  • value

  • ownerElement

  • data

  • length

  • isElementContentWhitespace

  • wholeText

The XMLHttpRequest example demonstrates how to use the XMLHttpRequest object to make a request and read the response headers.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+