The example consists of an item class, a plugin class and a QML file
to use this plugin. The \c TextBalloon class represents the individual
text balloons extending QQuickPaintedItem, the \c TextBalloonPlugin class
- represents the skeleton code for a QtQuick plugin and the
+ represents the skeleton code for a \l {Qt Quick} plugin and the
\c textballoons.qml file is used to load the plugin and display the text
balloons.
We will focus on the \c TextBalloon class first and continue with the
- \c textballoons.qml file. For an example on how to implement a QtQuick
+ \c textballoons.qml file. For an example on how to implement a \l {Qt Quick}
plugin please look at \l{declarative/tutorials/extending/chapter6-plugins}
{Writing an Extension Plugin}
\snippet quick/particles/system/content/dynamicemitters.qml 0
Note that this effect, a flurry of flying rainbow spears, would be better served with TrailEmitter. It is only done with dynamic emitters in this example to show the concept more simply.
- Multiple Painters shows how to control paint ordering of individual particles. While the paint ordering of particles within one ImagePainter is not strictly defined, ImageParticle objects follow the normal Z-ordering rules for QtQuick items. This example allow you to paint the inside of the particles above the black borders using a pair of ImageParticles each painting different parts of the same logical particle.
+ Multiple Painters shows how to control paint ordering of individual particles. While the paint ordering of particles within one ImagePainter is not strictly defined, ImageParticle objects follow the normal Z-ordering rules for \l {Qt Quick} items. This example allow you to paint the inside of the particles above the black borders using a pair of ImageParticles each painting different parts of the same logical particle.
*/
\ingroup qtquickexamples
This example demonstrates a couple of visual effects that you can perform
- with shaders in QtQuick 2.0
+ with shaders in \l {Qt Quick}.
ShaderEffects typically operate on other types, using a ShaderEffectSource
\snippet quick/shadereffects/shadereffects.qml source
\image qml-modelviews-example.png
\ingroup qtquickexamples
- This is a collection of small QML examples relating to model and view functionality. They demonstrate how to show data from a model using the QtQuick view types.
+ This is a collection of small QML examples relating to model and view functionality. They demonstrate how to show data from a model using the \l {Qt Quick} view types.
\section2 GridView and PathView demonstrate usage of these types to display views.
\snippet quick/views/gridview/gridview-example.qml 0
\li \l enumeration
\endtable
-(Note that classes provided by the QtGui module, such as QColor, QFont,
-QQuaternion and QMatrix4x4, are only available from QML when the \l QtQuick
-module is imported.)
+\note Classes provided by the \l {Qt GUI} module, such as QColor, QFont,
+QQuaternion and QMatrix4x4, are only available from QML when the \l {Qt Quick}
+module is included.
As a convenience, many of these types can be specified in QML by string values,
or by a related method provided by the \l {QML:Qt} object. For example, the \l
\endcode
This is useful when deriving from base classes provided by other authors,
-e.g. when extending classes from the QtQuick library.
+e.g. when extending classes from the Qt Quick module.
\section1 Defining QML-Specific Types and Attributes
\section2 Defining Visual Items with the QtQuick Module
-When building user interfaces with the QtQuick module, all QML objects that are
+When building user interfaces with the \l {Qt Quick} module, all QML objects that are
to be visually rendered must derive from the \l Item type, as it is the base
-type for all visual objects in the QtQuick module. This \l Item type is
+type for all visual objects in \l {Qt Quick}. This \l Item type is
implemented by the QQuickItem C++ class, which is provided as part of the
-QtQuick C++ module. Therefore, this class should be subclassed when it is
+\l {Qt Quick} C++ module. Therefore, this class should be subclassed when it is
necessary to implement a visual type in C++ that can be integrated into a
QML-based user interface.
C++
\li Use and invoke some C++ functionality from QML (for example, to invoke your application logic,
use a data model implemented in C++, or call some functions in a third-party C++ library)
-\li Access functionality in the \l {Qt QML} or QtQuick C++ API (for example, to dynamically generate
+\li Access functionality in the \l {Qt QML} or \l {Qt Quick} C++ API (for example, to dynamically generate
images using QQuickImageProvider)
\li Implement your own \l{qtqml-typesystem-objecttypes.html}{QML object types} from C++
\unicode{0x2014} whether for use within your own specific application, or for distribution to others
\li The first is the parent for the new object. The parent can be a graphical
object (i.e. of the \l Item type) or non-graphical object (i.e. of the
\l QtObject or C++ QObject type). Only graphical objects with graphical
- parent objects will be rendered to the QtQuick visual canvas. If you wish
+ parent objects will be rendered to the \l {Qt Quick} visual canvas. If you wish
to set the parent later you can safely pass \c null to this function.
\li The second is optional and is a map of property-value pairs that define
initial any property values for the object. Property values specified by
\section1 Imports Within JavaScript Resources
-In QtQuick 2.0, support has been added to allow JavaScript resources to import
+In \c {QtQuick 2.0}, support has been added to allow JavaScript resources to import
other JavaScript resources and also QML type namespaces using a variation of
the standard QML import syntax (where all of the previously described rules and
qualifications apply).
Due to the ability of a JavaScript resource to import another script or QML
-module in this fashion in QtQuick 2.0, some extra semantics are defined:
+module in this fashion in \c {QtQuick 2.0}, some extra semantics are defined:
\list
\li a script with imports will not inherit imports from the QML document which imported it (so accessing Component.errorString will fail, for example)
\li a script without imports will inherit imports from the QML document which imported it (so accessing Component.errorString will succeed, for example)
\title Defining Object Types through QML Documents
\brief Description of how a QML document is a reusable type definition
-One of the core features of QML is that it enables QML object types to be easily defined in a lightweight manner through QML documents to suit the needs of individual QML applications. The standard QtQuick module provides various types like \l Rectangle, \l Text and \l Image for building a QML application; beyond these, you can easily define your own QML types to be reused within your application. This ability to create your own types forms the building blocks of any QML application.
+One of the core features of QML is that it enables QML object types to be easily defined in a lightweight manner through QML documents to suit the needs of individual QML applications. The standard \l {Qt Quick} module provides various types like \l Rectangle, \l Text and \l Image for building a QML application; beyond these, you can easily define your own QML types to be reused within your application. This ability to create your own types forms the building blocks of any QML application.
\section1 Defining an Object Type with a QML File
}
\endqml
-This declares an object of type \l Rectangle, followed by a set of curly braces that encompasses the attributes defined for that object. The \l Rectangle type is a type made available by the \l QtQuick module, and the attributes defined in this case are the values of the rectangle's \c width, \c height and \c color properties. (These are properties made available by the \l Rectangle type, as described in the \l Rectangle documentation.)
+This declares an object of type \l Rectangle, followed by a set of curly braces that encompasses the attributes defined for that object. The \l Rectangle type is a type made available by the \c QtQuick module, and the attributes defined in this case are the values of the rectangle's \c width, \c height and \c color properties. (These are properties made available by the \l Rectangle type, as described in the \l Rectangle documentation.)
-The above object can be loaded by the engine if it is part of a \l{qtqml-documents-topic.html}{QML document}. That is, if the source code is complemented with \e import statement that imports the QtQuick module (to make the \l Rectangle type available), as below:
+The above object can be loaded by the engine if it is part of a \l{qtqml-documents-topic.html}{QML document}. That is, if the source code is complemented with \e import statement that imports the \c QtQuick module (to make the \l Rectangle type available), as below:
\qml
import QtQuick 2.0
}
\endqml
-When placed into a \c .qml file and loaded by the QML engine, the above code creates a \l Rectangle object using the \l Rectangle type supplied by the QtQuick module:
+When placed into a \c .qml file and loaded by the QML engine, the above code creates a \l Rectangle object using the \l Rectangle type supplied by the \c QtQuick module:
\image qtqml-syntax-basics-object-declaration.png
When this code is loaded by the engine, it creates an object tree with a \l Rectangle object at the root; this object has a \l Gradient child object, which in turn has two \l GradientStop children.
Note, however, that this is a parent-child relationship in the context of the QML object tree, not
-in the context of the visual scene. The concept of a parent-child relationship in a visual scene is provided by the \l Item type from the \l QtQuick module, which is the base type for most QML types, as most QML objects are intended to be visually rendered. For example, \l Rectangle and \l Text are both \l {Item}-based types, and below, a \l Text object has been declared as a visual child of a \l Rectangle object:
+in the context of the visual scene. The concept of a parent-child relationship in a visual scene is provided by the \l Item type from the \c QtQuick module, which is the base type for most QML types, as most QML objects are intended to be visually rendered. For example, \l Rectangle and \l Text are both \l {Item}-based types, and below, a \l Text object has been declared as a visual child of a \l Rectangle object:
\qml
import QtQuick 2.0
namespace is specified, then any references to the types made available by the
import must be prefixed by the local namespace qualifier.
-Below, the QtQuick module is imported into the namespace "CoreItems". Now, any
+Below, the \c QtQuick module is imported into the namespace "CoreItems". Now, any
references to types from the \c QtQuick module must be prefixed with the
\c CoreItems name:
width: 100; height: 100
MyModule.Text { text: "Hello from my custom text item!" }
- CoreItems.Text { text: "Hello from QtQuick!" }
+ CoreItems.Text { text: "Hello from Qt Quick!" }
}
\endqml
\section2 Using the Connections Type
-In some cases it may be desirable to access a signal outside of the object that emits it. For these purposes, the QtQuick module provides the \l Connections type for connecting to signals of arbitrary objects. A \l Connections object can receive any signal from its specified \l {Connections::target}{target}.
+In some cases it may be desirable to access a signal outside of the object that emits it. For these purposes, the \c QtQuick module provides the \l Connections type for connecting to signals of arbitrary objects. A \l Connections object can receive any signal from its specified \l {Connections::target}{target}.
For example, the \c onClicked handler in the earlier example could have been received by the root \l Rectangle instead, by placing the \c onClicked handler in a \l Connections object that has its \l {Connections::target}{target} set to the \l MouseArea:
\section2 Basic Types Provided By QML Modules
QML modules may extend the QML language with more basic types.
-For example, the basic types provided by the QtQuick module are listed below:
+For example, the basic types provided by the \c QtQuick module are listed below:
\annotatedlist qtquickbasictypes
Currently only QML modules which are provided by Qt may provide their
The \l{Qt QML} module is new in Qt 5.0. It provides the QML engine and
implements the QML language supporting infrastructure.
-(Prior to Qt 5, this functionality was provided by the QtDeclarative module, which
-has now been replaced by the new \l {Qt QML} and QtQuick C++ modules. See the
+(Prior to Qt 5, this functionality was provided by the \c QtDeclarative module, which
+has now been replaced by the new \l {Qt QML} and \l {Qt Quick} C++ modules. See the
\l {Porting QML Applications to Qt 5} for more information.)
\section2 QML Engine
\list
\li QML now supports defining properties of value type basic types within QML documents. Supported types include
QSizeF, QPointF and QRectF as \c size, \c point and \c rect respectively.
- \li QColor is now a value type provided by the QtQuick module. The red, green, blue and alpha channels
+ \li QColor is now a value type provided by the \c QtQuick module. The red, green, blue and alpha channels
of a \l color property can be accessed via \c r, \c g, \c b and \c a properties.
\li Factory functions for various value types have been added to the \c Qt object exposed to QML.
- Some of those functions require the QtQuick module to be imported in order to return valid values.
- See the QtQuick 2.0 release notes for more information about these functions.
+ Some of those functions require the \c QtQuick module to be imported in order to return valid values.
+ See the \l {Qt Quick Release Notes} for more information about these functions.
\endlist
\li Support for sequence types QList<int>, QList<qreal>, QList<bool>, QList<QUrl>,
QList<QString> and QStringList has been improved. QObjects can define Q_PROPERTYs of
}
\endcode
- You can also use QCoreApplication with QQmlApplicationEngine, if you are not using any QML modules which require a QGuiApplication (such as QtQuick).
+ You can also use QCoreApplication with QQmlApplicationEngine, if you are not using any QML modules which require a QGuiApplication (such as \c QtQuick).
List of configuration changes from a default QQmlEngine:
it is not destroyed by the garbage collector. This is true regardless of whether \l{Item::parent} is set afterwards,
since setting the Item parent does not change object ownership; only the graphical parent is changed.
- As of QtQuick 1.1, this method accepts an optional \a properties argument that specifies a
+ As of \c {QtQuick 1.1}, this method accepts an optional \a properties argument that specifies a
map of initial property values for the created object. These values are applied before object
creation is finalized. This is more efficient than setting property values after object creation,
particularly where large sets of property values are defined, and also allows property bindings
\li \c size - use \l{Qt::size()}{Qt.size()}
\endlist
-If the QtQuick module has been imported, the following helper functions for
+If the \c QtQuick module has been imported, the following helper functions for
creating objects of specific data types are also available for clients to use:
\list
\li \c color - use \l{Qt::rgba()}{Qt.rgba()}, \l{Qt::hsla()}{Qt.hsla()}, \l{Qt::darker()}{Qt.darker()}, \l{Qt::lighter()}{Qt.lighter()} or \l{Qt::tint()}{Qt.tint()}
}
\endcode
- The QtQuick 1.0 version of this class is named QDeclarativeParserStatus.
+ The Qt Quick 1 version of this class is named QDeclarativeParserStatus.
*/
/*! \internal */
\snippet qml/qtBinding.4.qml 0
- Note: in QtQuick 1.x, all function assignment was treated as
+ Note: in \c {QtQuick 1.x}, all function assignment was treated as
binding assignment, so the Qt.binding() function is new in
- QtQuick 2.0.
+ \c {QtQuick 2.0}.
\since QtQuick 2.0
*/
The VisualDataModel type encapsulates a model and the delegate that will
be instantiated for items in a model.
- This type is provided by QtQuick 2 for compatibility reasons. The same implementation
+ This type is provided by \c {QtQuick 2} for compatibility reasons. The same implementation
is now primarily available as DelegateModel in the QtQml.Models module.
\sa {QtQml.Models2::DelegateModel}
The DelegateModel type encapsulates a model and the delegate that will
be instantiated for items in the model.
- This element is also available as DelegateModel in the QtQuick module. For full details,
+ This element is also available as DelegateModel in the \c QtQuick module. For full details,
see the \l DelegateModel documentation.
The DelegateModel type encapsulates a model and the delegate that will
The DelegateModelGroup type provides a means to address the model data of a DelegateModel's
delegate items, as well as sort and filter these delegate items.
- This element is also available as DelegateModelGroup in the QtQuick module. For full details,
+ This element is also available as DelegateModelGroup in the \c QtQuick module. For full details,
see the \l DelegateModelGroup documentation.
\sa {QtQuick::DelegateModelGroup}
The ListModel is a simple container of ListElement definitions, each containing data roles.
The contents can be defined dynamically, or explicitly in QML.
- This type is also available in the QtQuick 2 import. For full documentation, see \l QtQuick2::ListModel
+ This type is also available in the \c {QtQuick 2} import. For full documentation, see \l QtQuick2::ListModel
*/
/*!
\qmltype ListModel
List elements are defined inside ListModel definitions, and represent items in a list.
- This type is also available in the QtQuick 2 import. For full documentation, see \l QtQuick2::ListElement
+ This type is also available in the \c {QtQuick 2} import. For full documentation, see \l QtQuick2::ListElement
*/
/*!
\qmltype ListElement
as a model.
This element is now primarily available as ObjectModel in the QtQml.Models module.
- VisualItemModel continues to be provided, with the same implementation, in QtQuick for
+ VisualItemModel continues to be provided, with the same implementation, in \c QtQuick for
compatibility reasons.
For full details about the type, see the \l ObjectModel documentation.
If you must expose a QVariantMap to QML, use a "var" property rather than a "variant"
property. In general, "property var" should be considered to be superior to
-"property variant" for every use-case in QtQuick 2.0 (note that "property variant"
-is marked as obsolete in the QtQuick 2.0 documentation), as it allows a true JavaScript
+"property variant" for every use-case in Qt Quick 2 (note that "property variant"
+is marked as obsolete in the Qt Quick 2 documentation), as it allows a true JavaScript
reference to be stored (which can reduce the number of conversions required in certain
expressions).
\section2 Other JavaScript Objects
Different JavaScript engines provide different optimizations. The JavaScript engine
-which QtQuick 2 uses is optimized for object instantiation and property lookup, but
+which \l {Qt Quick}{Qt Quick 2} uses is optimized for object instantiation and property lookup, but
the optimizations which it provides relies on certain criteria. If your application
does not meet the criteria, the JavaScript engine falls back to a "slow-path" mode
with much worse performance. As such, always try to ensure you meet the following
\section3 Don't Use Dynamic Roles
-The ListModel element in QtQuick 2.0 is much more performant than in QtQuick 1.0. The
+The ListModel element in \c {QtQuick 2.0} is much more performant than in \c {QtQuick 1.0}. The
performance improvements mainly come from assumptions about the type of roles within each
element in a given model - if the type doesn't change, the caching performance improves
dramatically. If the type can change dynamically from element to element, this optimization
\section1 Visual Effects
-QtQuick 2 includes several features which allow developers and designers to create
+\l {Qt Quick}{Qt Quick 2} includes several features which allow developers and designers to create
exceptionally appealing user interfaces. Fluidity and dynamic transitions as well
as visual effects can be used to great effect in an application, but some care must
be taken when using some of the features in QML as they can have performance implications.
\section2 Particles
-The QtQuick 2.0 Particles module allows beautiful particle effects to be integrated
+The \l {QtQuick.Particles 2}{Qt Quick 2.0 Particles} module allows beautiful particle effects to be integrated
seamlessly into user interfaces. However every platform has different graphics hardware
capabilities, and the Particles module is unable to limit parameters to what your hardware
can gracefully support. The more particles you attempt to render (and the larger they are),
\section1 Rendering
-The scene graph used for rendering in QtQuick 2.0 allows highly dynamic, animated user
+The scene graph used for rendering in \c {QtQuick 2.0} allows highly dynamic, animated user
interfaces to be rendered fluidly at 60 FPS. There are some things which can
dramatically decrease rendering performance, however, and developers should be careful
to avoid these pitfalls wherever possible.
The scene graph renderer is able to batch up certain operations to minimise the number of
OpenGL state changes required. However, this optimization is only possible for the
-built-in layout elements provided by QtQuick 2.0, and cannot be applied to manual layouts.
+built-in layout elements provided by \c {QtQuick 2.0}, and cannot be applied to manual layouts.
Therefore, application developers should use the Row, Column, Grid, GridView and ListView
elements instead of manual layouts wherever possible.
\section1 QtQuick Module
-The QtQuick module has been updated to version 2.0. All QML applications should update their import
+The \c QtQuick module has been updated to version 2.0. All QML applications should update their import
statements to use the new version:
\qml
\e {QtQuick.LocalStorage} instead. See the \l {QtQuick.LocalStorage 2}{QtQuick.LocalStorage} documentation
for examples.
\li The \c LayoutItem type has been removed from the \c QtQuick module as it was specific to the
-Graphics View framework backend used in QtQuick 1.
+Graphics View framework backend used in \c {QtQuick 1}.
\endlist
\section2 Behavioral Changes
-QtQuick 2.0 includes a number of behavioral changes and you should thoroughly test your applications after
+\c {QtQuick 2.0} includes a number of behavioral changes and you should thoroughly test your applications after
porting. These changes will not necessarily lead to run-time errors, but may break certain assumptions in your code.
Below are the prominent changes to be aware of when porting your applications.
\tt {(visible && opacity > 0.0)}.
\li Previously, if an item was in a positioner (i.e. a \l Row, \l Column, \l Grid and \l Flow)
and the item's \c opacity changed to 0, or its \c visible value became \c false, the positioner
- would remove the item from its layout and collapse the space for that item. In QtQuick 2.0, this
+ would remove the item from its layout and collapse the space for that item. In \c {QtQuick 2.0}, this
now only happens when an item's \c visible is \c false; the item opacity no longer affects whether
the item is laid out. (This is consistent with the existing behavior of ListView and GridView).
\endlist
\list
\li The \c Qt.labs.particles module has been removed. It is replaced by the fully-fledged \l
-QtQuick.particles module which is an enormous improvement on its predecessor.
+QtQuick.Particles module which is an enormous improvement on its predecessor.
\li The \c Qt.labs.shaders module has been removed as the \c ShaderEffectItem and \l
-ShaderEffectSource types from this module have been moved into the \l QtQuick module. Note the \c
+ShaderEffectSource types from this module have been moved into the \c QtQuick module. Note the \c
ShaderEffectItem type has been renamed to \l ShaderEffect.
\endlist
In Qt 5, all QML applications are rendered with an OpenGL scenegraph architecture rather than the
Graphics View framework used in Qt 4. Due to the scale of this architectural change, the C++ API has
been extensively restructured and the \c QtDeclarative module has been deprecated in favour of two
-new modules: \l {Qt QML}, which implements the QML engine and language infrastructure, and \l QtQuick,
+new modules: \l {Qt QML}, which implements the QML engine and language infrastructure, and \l {Qt Quick},
which implements the visual canvas and scenegraph backend.
All classes that were previously in the \c QtDeclarative module have been moved into the \l {Qt QML}
-and \l QtQuick modules, and their class names have been changed to reflect their new module
+and \l {Qt Quick} modules, and their class names have been changed to reflect their new module
locations. The class name changes are as follows:
\table
\endlist
\endtable
-To use the new \c QQml* and \c QtQuick* classes in Qt 5, link against the approprate module from
-your qmake \c .pro file. For example the following will link against both the \l {Qt QML} and QtQuick
+To use the new \c QQml* and \c QQuick* classes in Qt 5, link against the approprate module from
+your qmake \c .pro file. For example the following will link against both the \l {Qt QML} and \l {Qt Quick}
modules:
\code
#include <QtQuick/QQuickView>
\endcode
-(The \c QtDeclarative module is still available to developers as the \l QtQuick1 module, as
+(The \c QtDeclarative module is still available to developers as the \c {Qt Quick 1} module, as
discussed in \l{Using the QtDeclarative module in Qt 5}{below}. However, it should not be used for
new applications.)
\section2 QtDeclarative module in Qt 5
-For the purposes of porting older applications, the \c QtDeclarative module is still available in Qt
-5 but has been renamed to \c QtQuick1. Applications that required QtQuick 1 specific API (e.g.
+For the purposes of porting older applications, the \c {QtDeclarative} module is still available in Qt
+5 but has been renamed to \c {Qt Quick 1}. Applications that required Qt Quick 1 specific API (e.g.
QDeclarativeView or QDeclarativeItem and the Graphics View integration) can use this module. Note
-that new applications should use the new \l {Qt QML} and \l QtQuick modules instead.
+that new applications should use the new \l {Qt QML} and \l {Qt Quick} modules instead.
-To use the \c QtQuick1 module, add “quick1” module to your qmake \c .pro file:
+To use the \c {Qt Quick 1} module, add "quick1" to your qmake \c .pro file:
\code
QT += quick1
\title Usecase - Animations In QML
\brief Example of how to include animations in QML applications
-QtQuick provides the ability to animate properties. Animating properties allows property values to move through
+\l {Qt Quick} provides the ability to animate properties. Animating properties allows property values to move through
intermediate values instead of immediately changing to the target value. To animate the position of an item, you can
animate the properties that controle the item's position, x and y for example, so that the item's position
changes each frame on the way to the target position.
\title Use Case - Style And Theme Support
\brief Example of how to style user interface components in QML
-The types provided in the QtQuick module are not complete user interface components on their own. A common use case is to
-develop a set of custom styled user interface components out of the types in the QtQuick module. This is easily
+The types provided in the \l {Qt Quick} module are not complete user interface components on their own. A common use case is to
+develop a set of custom styled user interface components out of the types in the \l {Qt Quick} module. This is easily
accomplished by creating your own reusable components.
With the reusable components approach, you define your own type with the appearance you want to have in your
\page qtquick-usecase-text.html
\title Use Case - Displaying Text In QML
\brief Example of how to display text in QML
-To display text the Text type is provided by the QtQuick module. For related uses, the \l{TextInput} and
+To display text the Text type is provided by the \l {Qt Quick} module. For related uses, the \l{TextInput} and
\l{TextEdit} types provide editable text controls. For full HTML markup, see the \c{QtWebkit} module.
\section1 Displaying and Formatting Text
\section1 Supported Types of User Input
-The \l QtQuick module provides support for the most common types of user input,
+The \l {Qt Quick} module provides support for the most common types of user input,
including mouse and touch events, text input and key-press events. Other
modules provide support for other types of user input (for example, the
\l QtSensors module provides support for shake-gestures in QML applications).
\snippet qml/usecases/userinput-keys.qml 0
-For text input the \l QtQuick module provides several built-in types.
+For text input the \l {Qt Quick} module provides several built-in types.
In particular, the \l TextInput and \l TextEdit types allow for single-line
entry and multi-line editing respectively.
\section1 The Rectangle Type
-For the most basic of visuals, QtQuick provides a \l Rectangle type to draw rectangles. These rectangles can be colored with a
+For the most basic of visuals, \l {Qt Quick} provides a \l Rectangle type to draw rectangles. These rectangles can be colored with a
color or a vertical gradient. The \l Rectangle type can also draw borders on the rectangle.
For drawing custom shapes beyond rectangles, see the \l Canvas type or display
\section1 The Image Type
-QtQuick provides an \l Image type which may be used to display images. The
+\l {Qt Quick} provides an \l Image type which may be used to display images. The
\l Image type has a \l source property whose value can be a remote or local
URL, or the URL of an image file embedded in a compiled resource file.
\section1 Shared Visual Properties
-All visual items provided by the QtQuick are based on the Item type, which provides a common set of attributes for
+All visual items provided by \l {Qt Quick} are based on the Item type, which provides a common set of attributes for
visual items, including opacity and transform attributes.
\section2 Opacity and Visibility
\section1 Dynamic Signal Connections
QML supports dynamic signal connections through a signal's \c{connect()}
-method. The QtQuick module provides the convenience \l Connections type which
+method. The \l {Qt Quick} module provides the convenience \l Connections type which
allows setting up a signal connection involving an object which isn't part of
the static object hierarchy. It also allows the connection to be dynamically
retargeted at runtime, which allows an application to process different signal
\section1 Sprite Engine
-The QtQuick sprite engine is a stochastic state machine combined with the ability
+The \l {Qt Quick} sprite engine is a stochastic state machine combined with the ability
to chop up images containing multiple frames of an animation.
\section2 State Machine
by this module, organized according to category and purpose.
-\section1 Importing QtQuick
+\section1 Importing \c QtQuick
-The types provided by the QtQuick module are only available in a QML document
+The types provided by the \l {Qt Quick} module are only available in a QML document
if that document imports the \c QtQuick namespace.
-The current version of the QtQuick module is version 2.0, and thus it may be
+The current version of the \c QtQuick module is version 2.0, and thus it may be
imported via the following statement:
\qml
import QtQuick 2.0
\endqml
-See the QtQuick module documentation for more
+See the \l {Qt Quick} module documentation for more
information about the concepts which are central to \c QtQuick.
\section2 Submodules
\l{qtqml-typesystem-basictypes.html#basic-types-provided-by-the-qml-language}
{supported by default in the QML language}.
-In addition, the QtQuick module provides the following basic types:
+In addition, the \c QtQuick module provides the following basic types:
\annotatedlist qtquickbasictypes
\section1 Object Types
-All of the object types provided by QtQuick are based on the \l{Item} type,
+All of the object types provided by \c QtQuick are based on the \l{Item} type,
which itself derives from \l{QML::QtObject}. \l{qtqml-typereference-topic.html#object-types}
{QML object types} provided by the Qt QML module
(such as \l{QML::QtObject} and \l{QML::Component}) are also available when
/*!
\qmlmodule QtQuick 2
-\brief The QtQuick 2 module provides graphical primitives for use in QML.
+\brief The \c {QtQuick 2} module provides graphical primitives for use in QML.
-The QtQuick 2 module provides graphical primitive types. They can be used with the following import
+The \c {QtQuick 2} module provides graphical primitive types. They can be used with the following import
\code
import QtQuick 2.1
\endcode
-For a more detailed listing of types in the \c QtQuick 2 import, see the \l{Qt Quick QML Types} page.
+For a more detailed listing of types in the \c {QtQuick 2} import, see the \l{Qt Quick QML Types} page.
For more details about the module itself, see the \l{Qt Quick} module page.
*/
The QtQuick C++ module is new in Qt 5. It provides the visual canvas and scenegraph back-end
as well as the QtQuick QML module for QML application development.
-As of Qt 5, the QtQuick module is based on an OpenGL scenegraph. Many of the classes in
-the QtQuick module have been ported from the \c QtDeclarative module from Qt 4.8 to use
+As of Qt 5, the \l {Qt Quick} module is based on an OpenGL scenegraph. Many of the classes in
+the Qt Quick module have been ported from the \c QtDeclarative module from Qt 4.8 to use
the scenegraph architecture; these classes have been renamed to use a \c QQuick* prefix.
(See the \l {Porting QML Applications to Qt 5} for porting information.)
\section1 Qt 5.0 - QtQuick QML Module
-The QtQuick 2.0 QML module is a major update.
+The \c {QtQuick 2.0} QML module is a major update.
-Below are the additions in QtQuick 2.0. For a list of behavioral changes which may affect
-applications ported from QtQuick 1.x, see the \l {Porting QML Applications to Qt 5}.
+Below are the additions in \c {QtQuick 2.0}. For a list of behavioral changes which may affect
+applications ported from \c {QtQuick 1.x}, see the \l {Porting QML Applications to Qt 5}.
\section2 Visual types, Graphical Effects and Sprites
The \c Qt.rgba(), \c Qt.hsla(), \c Qt.tint(), \c Qt.lighter(), \c Qt.darker()
and \c Qt.fontFamilies() functions already existed in \c QtDeclarative prior
-to QtQuick 2.0; the other functions are all new in QtQuick 2.0.
+to \c {QtQuick 2.0}; the other functions are all new in \c {QtQuick 2.0}.
\section1 Qt 5.0 - Additional QML Modules
\section2 QtQuick.XmlListModel
-This new module contains XmlListModel and associated types, which were previously in the QtQuick
+This new module contains XmlListModel and associated types, which were previously in the \c QtQuick
module. See the \l{QtQuick.XmlListModel 2}{QtQuick.XmlListModel} documentation for details.
\section2 QtQuick.LocalStorage
/*!
\class QQuickItem
- \brief The QQuickItem class provides the most basic of all visual items in QtQuick.
+ \brief The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
\inmodule QtQuick
All visual items in Qt Quick inherit from QQuickItem. Although a QQuickItem
\c event.accepted to \c true so that the event is not propagated to the
parent \l Rectangle.
- Since QtQuick 2.0 Loader can also load non-visual components.
+ Since \c {QtQuick 2.0}, Loader can also load non-visual components.
\section2 Using a Loader within a view delegate
\qmlproperty url QtQuick2::Loader::source
This property holds the URL of the QML component to instantiate.
- Since QtQuick 2.0 Loader is able to load any type of object; it
+ Since \c {QtQuick 2.0}, Loader is able to load any type of object; it
is not restricted to Item types.
To unload the currently loaded object, set this property to an empty string,
To unload the currently loaded object, set this property to an empty string
or \c undefined.
- Since QtQuick 2.0 Loader is able to load any type of object; it
+ Since \c {QtQuick 2.0}, Loader is able to load any type of object; it
is not restricted to Item types.
\sa source, progress
\qmlproperty object QtQuick2::Loader::item
This property holds the top-level object that is currently loaded.
- Since QtQuick 2.0 Loader can load any object type.
+ Since \c {QtQuick 2.0}, Loader can load any object type.
*/
QObject *QQuickLoader::item() const
{
cases, these lists will be empty. See the \l ViewTransition documentation for more details
and examples on using these transitions.
- \note In QtQuick 1, this transition was applied to all items that were part of the
- positioner at the time of its creation. From QtQuick 2 onwards, positioners apply the
+ \note In Qt Quick 1, this transition was applied to all items that were part of the
+ positioner at the time of its creation. From \l {Qt Quick}{Qt Quick 2} onwards, positioners apply the
\l populate transition to these items instead.
\sa add, ViewTransition, {qml/positioners}{Positioners example}
cases, these lists will be empty. See the \l ViewTransition documentation for more details
and examples on using these transitions.
- \note In QtQuick 1, this transition was applied to all items that were part of the
- positioner at the time of its creation. From QtQuick 2 onwards, positioners apply the
+ \note In Qt Quick 1, this transition was applied to all items that were part of the
+ positioner at the time of its creation. From \l {Qt Quick}{QtQuick 2} onwards, positioners apply the
\l populate transition to these items instead.
\sa add, ViewTransition, {qml/positioners}{Positioners example}
cases, these lists will be empty. See the \l ViewTransition documentation for more details
and examples on using these transitions.
- \note In QtQuick 1, this transition was applied to all items that were part of the
- positioner at the time of its creation. From QtQuick 2 onwards, positioners apply the
+ \note In Qt Quick 1, this transition was applied to all items that were part of the
+ positioner at the time of its creation. From \l {Qt Quick}{QtQuick 2} onwards, positioners apply the
\l populate transition to these items instead.
\sa add, ViewTransition, {qml/positioners}{Positioners example}
cases, these lists will be empty. See the \l ViewTransition documentation for more details
and examples on using these transitions.
- \note In QtQuick 1, this transition was applied to all items that were part of the
- positioner at the time of its creation. From QtQuick 2 onwards, positioners apply the
+ \note In Qt Quick 1, this transition was applied to all items that were part of the
+ positioner at the time of its creation. From \l {Qt Quick}{QtQuick 2} onwards, positioners apply the
\l populate transition to these items instead.
\sa add, ViewTransition, {qml/positioners}{Positioners example}
\since QtQuick 2.0
\inherits Item
\ingroup qtquick-effects
- \brief Renders a QtQuick item into a texture and displays it
+ \brief Renders a \l {Qt Quick} item into a texture and displays it
The ShaderEffectSource type renders \l sourceItem into a texture and
displays it in the scene. \l sourceItem is drawn into the texture as though
ShaderEffectSource can be used as:
\list
\li a texture source in a \l ShaderEffect.
- This allows you to apply custom shader effects to any QtQuick item.
+ This allows you to apply custom shader effects to any \l {Qt Quick} item.
\li a cache for a complex item.
The complex item can be rendered once into the texture, which can
then be animated freely without the need to render the complex item
The class has to be used from C++ directly, using the property of the \l TextEdit.
- Warning: The QTextDocument provided is used internally by QtQuick elements to provide text manipulation primitives.
+ Warning: The QTextDocument provided is used internally by \l {Qt Quick} elements to provide text manipulation primitives.
You are not allowed to perform any modification of the internal state of the QTextDocument. If you do, the element
in question may stop functioning or crash.
*/
\ingroup qtquick-visual
\brief Creates a new top-level window
- The Window object creates a new top-level window for a QtQuick scene. It automatically sets up the
- window for use with QtQuick 2.x graphical types.
+ The Window object creates a new top-level window for a Qt Quick scene. It automatically sets up the
+ window for use with \c {QtQuick 2.x} graphical types.
To use this type, you will need to import the module with the following line:
\code
anchors.fill: parent
Text { textFormat: Text.RichText; anchors.fill: parent; anchors.margins: 5; wrapMode: Text.WordWrap
- text: "<b>QtQuick 2 System Testing</b><br><br>"+
+ text: "<b>Qt Quick 2 System Testing</b><br><br>"+
"Each system test qml \"application\" provides a basic visual element affected by one or more non-visual (functional) elements.<br>"+
"Simply select the element you wish to test, and follow the instructions. Use the arrow to advance the test.<br>"
}