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

Qt QML QML Types

List of QML types provided by the Qt QML module.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Qt QML QML Types

The Qt QML module provides the definition and implementation of various convenience types which can be used with the QML language, including some elementary QML types which can provide the basis for further extensions to the QML language. The QtObject and Component object types are non-visual and provide building-blocks for extensions to QML.

Importing QtQml

The types provided by the QtQml module are only available in a QML document if that document imports the QtQml namespace (or if the document imports the QtQuick namespace, as noted below).

To use the module, import the QtQml module with the following statement:

 
Sélectionnez
import QtQml

Most clients will never need to use the QtQml import, as all of the types are also provided by the QtQuick namespace which may be imported as follows:

 
Sélectionnez
import QtQuick

See the Qt Quick module documentation for more information about the QtQuick namespace and what it provides to QML application developers.

The QML types for creating lists and models, such as ListModel and ListElement, are moved to a submodule, QtQml.Models. The Qt QML Models page has more information.

The documentation for the types below applies equally to the types of the same name provided by the Qt Quick module, as they are in fact identical.

Value Types

The following QML Value Types are provided:

  • point: a value with x and y attributes.

  • rect: a value with x, y, width and height attributes.

  • size: a value with width and height attributes.

Object Types

The following QML object types are provided:

Contents

  • Binding: Enables the arbitrary creation of property bindings.

  • Component: Encapsulates a QML component definition.

  • Connections: Describes generalized connections to signals.

  • Date: Provides date functions.

  • Locale: Provides locale specific properties and formatted data.

  • LoggingCategory: Defines a logging category in QML.

  • Number: The Number object provides represents a number value.

  • Qt: Provides a global object with useful enums and functions from Qt.

  • QtObject: A basic QML type.

  • String: The String object represents a string value.

  • Timer: Triggers a handler at a specified interval.

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