Qt Quick QML Types
The Qt Quick module provides graphical primitive types. These types are only available in a QML document if that document imports the QtQuick
namespace.
The current version of the QtQuick
module is version 2.7, and thus it may be imported via the following statement:
import QtQuick 2.7
Visit the Qt Quick module documentation for more information about the concepts which are central to QtQuick
.
Submodules
Qt Quick includes several submodules which contain additional types.
- XML List Model - contains types for creating models from XML data
- Local Storage - a submodule containing a JavaScript interface for an SQLite database
- Particles - provides a particle system for QML applications
- Window - contains types for creating top-level windows and accessing screen information
- Dialogs - contains types for creating and interacting with system dialogs
- Controls - provides a set of reusable UI components
- Layouts - contains types that are used to arrange items in the user interface
- Tests - types for testing QML applications.
Basic Types
There are a number of basic types that are supported by default in the QML language.
In addition, the QtQuick
import provides the following basic types:
ARGB color value. The type refers to an ARGB color value. It can be specified in a number of ways: | |
Font value with the properties of QFont. The type refers to a font value with the properties of QFont | |
A matrix4x4 type is a 4-row and 4-column matrix | |
A quaternion type has scalar, x, y, and z attributes | |
A vector2d type has x and y attributes | |
Value with x, y, and z attributes | |
A vector4d type has x, y, z and w attributes |
Object Types
All object types provided by the QtQuick
import are based on the Item type, which itself derives from QtObject. QML object types provided by the Qt QML module (such as QtObject and Component) are also available when you import QtQuick
.
Provides a 2D canvas item enabling drawing via JavaScript | |
Provides an opaque CanvasGradient interface | |
Contains image pixel data in RGBA order | |
Provides ordered and indexed access to the components of each pixel in image data | |
Provides 2D context for shapes on a Canvas item | |
Enables accessibility of QML items | |
Plays animations stored as a series of images | |
Draws a sprite animation | |
Paints a border based on an image | |
For specifying drag and drop events for moved Items | |
Provides information about a drag event | |
For specifying drag and drop handling in an area | |
Provides information about a key event | |
Provides information about a mouse event | |
Provides information about a mouse wheel event | |
Provides a surface that can be "flicked" | |
Provides a surface that can be flipped | |
Explicitly creates a focus scope | |
For specifying a grid view of items provided by a model | |
Displays an image | |
Provides a property to manipulate the appearance of Enter key on an on-screen keyboard | |
A basic visual QML type | |
Supports key navigation by arrow keys | |
Provides key handling to Items | |
Property used to mirror layout behavior | |
For specifying advanced transformations on Items | |
Animates changes in anchor values | |
Animates changes in parent values | |
Animates an item along a path | |
Contains the results from a call to Item::grabToImage() | |
Specifies items under transition in a view | |
Provides a list view of items provided by a model | |
Allows dynamic loading of a subtree from a URL or Component | |
Enables simple mouse handling | |
Enables handling of multiple touch points | |
Describes a touch point in a MultiPointTouchArea | |
Provides information about the used OpenGL version | |
Lays out model-provided items on a path | |
Enables simple pinch gesture handling | |
For specifying information about a pinch event | |
Positions its children in a column | |
Positions its children side by side, wrapping as necessary | |
Positions its children in grid formation | |
Provides attached properties that contain details on where an item exists in a positioner | |
Positions its children in a row | |
Defines a gradient fill | |
Defines the color at a position in a Gradient | |
Paints a filled rectangle with an optional border | |
Instantiates a number of Item-based components using a provided model | |
Applies custom shaders to a rectangle | |
Defines a mesh with vertices arranged in a grid | |
Renders a Qt Quick item into a texture and displays it | |
Specifies sprite animations | |
Draws a sprite animation | |
Specifies how to change the anchors of an item in a state | |
Specifies how to reparent an Item in a state change | |
Specifies how to add formatted text to a scene | |
Displays multiple lines of editable formatted text | |
Displays an editable line of text | |
Provides a way to apply a 4x4 tranformation matrix to an Item | |
Provides a way to rotate an Item | |
Provides a way to scale an Item | |
Provides a way to move an Item without changing its x or y properties | |
Is the base of all QML animations | |
Animates changes in color values | |
Animates changes in qreal-type values | |
Enables animations to be run in parallel | |
Provides a pause for an animation | |
Specifies immediate property changes during animation | |
Animates changes in property values | |
Animates changes in rotation values | |
Defines scripts to be run during an animation | |
Allows animations to be run sequentially | |
Animates changes in QVector3d values | |
Enables manual control of animations | |
Is the base of all QML animators | |
Type animates the opacity of an Item | |
Type animates the rotation of an Item | |
Type animates the scale factor of an Item | |
Type animates a uniform of a ShaderEffect | |
Type animates the x position of an Item | |
Type animates the y position of an Item | |
Defines a default animation for a property change | |
Allows fonts to be loaded by name or URL | |
Provides metrics for a given font | |
Defines a path for use by PathView | |
Defines an arc with the given radius | |
Specifies how to set an attribute at a given position in a Path | |
Defines a cubic Bezier curve with two control points | |
Defines a point on a Catmull-Rom curve | |
The base path type | |
Defines a straight line | |
Manipulates the way a path is interpreted | |
Defines a quadratic Bezier curve with a control point | |
Defines a path using an SVG path data string | |
Specifies how to manually animate along a path | |
Describes new property bindings or values for a state | |
Provides keyboard shortcuts | |
Allows a property to smoothly track a value | |
Allows a property to track a value in a spring-like motion | |
Defines configurations of objects and properties | |
Specifies how to run a script in a state | |
Provides built-in state support for non-Item types | |
Provides access to the Qt palettes | |
Provides metrics for a given font and text | |
Defines animated transitions that occur on state changes | |
Defines a validator for non-integer numbers | |
Defines a validator for integer values | |
Provides a string validator |