| context2d |
|
|
- |
| qquickabstractpaletteprovider_p.h |
|
908 |
- |
| qquickaccessibleattached.cpp |
!
\qmltype Accessible
\nativetype QQuickAccessibleAttached
\brief Enables accessibility of QML items.
\inqmlmodule QtQuick
\ingroup qtquick-visual-utility
\ingroup accessibility
This class is part of the \l {Accessibility for Qt Quick Applications}.
Items the user interacts with or that give information to the user
need to expose their information to the accessibility framework.
Then assistive tools can make use of that information to enable
users to interact with the application in various ways.
This enables Qt Quick applications to be used with screen-readers for example.
The most important properties are \l name, \l description and \l role.
Example implementation of a simple button:
\qml
Rectangle {
id: myButton
Text {
id: label
text: "next"
}
Accessible.role: Accessible.Button
Accessible.name: label.text
Accessible.description: "shows the next page"
Accessible.onPressAction: {
// do a button click
}
}
\endqml
The \l role is set to \c Button to indicate the type of control.
\l {Accessible::}{name} is the most important information and bound to the text on the button.
The name is a short and consise description of the control and should reflect the visual label.
In this case it is not clear what the button does with the name only, so \l description contains
an explanation.
There is also a signal handler \l {Accessible::pressAction}{Accessible.pressAction} which can be invoked by assistive tools to trigger
the button. This signal handler needs to have the same effect as tapping or clicking the button would have.
\sa Accessibility
|
25770 |
- |
| qquickaccessibleattached_p.h |
|
11071 |
- |
| qquickanchors.cpp |
|
41288 |
- |
| qquickanchors_p.h |
|
6650 |
- |
| qquickanchors_p_p.h |
|
6181 |
- |
| qquickanimatedimage.cpp |
!
\qmltype AnimatedImage
\nativetype QQuickAnimatedImage
\inqmlmodule QtQuick
\inherits Image
\brief Plays animations stored as a series of images.
\ingroup qtquick-visual
The AnimatedImage type extends the features of the \l Image type, providing
a way to play animations stored as images containing a series of frames,
such as those stored in GIF files.
Information about the current frame and total length of the animation can be
obtained using the \l currentFrame and \l frameCount properties. You can
start, pause and stop the animation by changing the values of the \l playing
and \l paused properties.
The full list of supported formats can be determined with QMovie::supportedFormats().
The number of times the animation plays can be controlled using the
\l loops property. By default, the animation loops indefinitely.
The \l finished signal is emitted when the animation finishes playing
the specified number of loops.
\section1 Example Usage
\beginfloatleft
\image animatedimageitem.gif {Game controller bouncing animation
with playback frame indicator underneath}
\endfloat
The following QML shows how to display an animated image and obtain information
about its state, such as the current frame and total number of frames.
The result is an animated image with a simple progress indicator underneath it.
\b Note: When animated images are cached, every frame of the animation will be cached.
Set cache to false if you are playing a long or large animation and you
want to conserve memory.
If the image data comes from a sequential device (e.g. a socket),
AnimatedImage can only loop if cache is set to true.
\clearfloat
\snippet qml/animatedimage.qml document
\sa BorderImage, Image
|
19159 |
- |
| qquickanimatedimage_p.h |
|
3051 |
- |
| qquickanimatedimage_p_p.h |
|
1628 |
- |
| qquickanimatedsprite.cpp |
!
\qmltype AnimatedSprite
\nativetype QQuickAnimatedSprite
\inqmlmodule QtQuick
\inherits Item
\ingroup qtquick-visual
\brief Draws a sprite animation.
AnimatedSprite provides rendering and control over animations which are provided
as multiple frames in the same image file. You can play it at a fixed speed, at the
frame rate of your display, or manually advance and control the progress.
Consider the following sprite sheet:
\image animatedsprite-loading.png {Sprite sheet with four frames
showing progressively appearing blue dots}
It can be divided up into four frames:
\image animatedsprite-loading-frames.png {Sprite sheet divided into
four frames with visible borders}
To play each of these frames at a speed of 500 milliseconds per frame, the
following code can be used:
\table
\header
\li Code
\li Result
\row
\li
\code
AnimatedSprite {
source: "loading.png"
frameWidth: 64
frameHeight: 64
frameCount: 4
frameDuration: 500
}
\endcode
\li
\image animatedsprite-loading-interpolated.gif {Loading
animation playing with frame interpolation}
\endtable
By default, the frames are interpolated (blended together) to make the
animation appear smoother. To disable this, set \l interpolate to \c false:
\table
\header
\li Code
\li Result
\row
\li
\code
AnimatedSprite {
source: "loading.png"
frameWidth: 64
frameHeight: 64
frameCount: 4
frameDuration: 500
interpolate: false
}
\endcode
\li
\image animatedsprite-loading.gif {Loading animation
playing without frame interpolation}
\endtable
To control how AnimatedSprite responds to being scaled, use the
\l {Item::}{smooth} property.
Note that unlike \l SpriteSequence, the AnimatedSprite type does not use
\l Sprite to define multiple animations, but instead encapsulates a
single animation itself.
\sa {Sprite Animations}
|
25759 |
- |
| qquickanimatedsprite_p.h |
|
5657 |
- |
| qquickanimatedsprite_p_p.h |
|
1601 |
- |
| qquickborderimage.cpp |
|
20738 |
- |
| qquickborderimage_p.h |
|
2266 |
- |
| qquickborderimage_p_p.h |
|
2152 |
- |
| qquickclipnode.cpp |
|
2760 |
- |
| qquickclipnode_p.h |
|
1099 |
- |
| qquickcolorgroup.cpp |
!
\internal
\class QQuickColorGroup
\brief The QQuickColorGroup class represents a set of colors.
\inmodule QtQuick
\since 6.0
Used by QQuickPalette to provide different groups of colors by roles.
\sa QPalette::ColorRole
//! internal \sa QQuickPalette, QQuickAbstractPaletteProvider
|
13742 |
- |
| qquickcolorgroup_p.h |
|
7818 |
- |
| qquickdrag.cpp |
!
\qmltype Drag
\nativetype QQuickDrag
\inqmlmodule QtQuick
\ingroup qtquick-input
\brief For specifying drag and drop events for moved Items.
Using the Drag attached property, any Item can be made a source of drag and drop
events within a scene.
When a drag is \l active on an item, any change in that item's position will
generate a drag event that will be sent to any DropArea that intersects
with the new position of the item. Other items which implement drag and
drop event handlers can also receive these events.
The following snippet shows how an item can be dragged with a MouseArea.
However, dragging is not limited to mouse drags; anything that can move an item
can generate drag events, including touch events, animations and bindings.
\snippet qml/drag.qml 0
A drag can be terminated either by canceling it with Drag.cancel() or setting
Drag.active to false, or it can be terminated with a drop event by calling
Drag.drop(). If the drop event is accepted, Drag.drop() will return the
\l {supportedActions}{drop action} chosen by the recipient of the event,
otherwise it will return Qt.IgnoreAction.
\sa {Qt Quick Examples - Drag and Drop}
|
34322 |
- |
| qquickdrag_p.h |
|
8997 |
- |
| qquickdrag_p_p.h |
|
3396 |
- |
| qquickdroparea.cpp |
!
\qmltype DropArea
\nativetype QQuickDropArea
\inherits Item
\inqmlmodule QtQuick
\ingroup qtquick-input
\brief For specifying drag and drop handling in an area.
A DropArea is an invisible item which receives events when other items are
dragged over it.
The \l Drag attached property can be used to notify the DropArea when an Item is
dragged over it.
The \l keys property can be used to filter drag events which don't include
a matching key.
The \l drag.source property is communicated to the source of a drag event as
the recipient of a drop on the drag target.
\sa {Qt Quick Examples - Drag and Drop}
|
13603 |
- |
| qquickdroparea_p.h |
|
5221 |
- |
| qquickevents.cpp |
!
\qmltype KeyEvent
\nativetype QQuickKeyEvent
\inqmlmodule QtQuick
\ingroup qtquick-input-events
\brief Provides information about a key event.
For example, the following changes the Item's state property when the Enter
key is pressed:
\qml
Item {
focus: true
Keys.onPressed: (event)=> { if (event.key == Qt.Key_Enter) state = 'ShowDetails'; }
}
\endqml
|
15696 |
- |
| qquickevents_p_p.h |
|
8433 |
- |
| qquickflickable.cpp |
|
133820 |
- |
| qquickflickable_p.h |
|
12263 |
- |
| qquickflickable_p_p.h |
|
9405 |
- |
| qquickflickablebehavior_p.h |
### Platform specific flickable mechanics are defined either here, or in
mkspec files. Long-term (QtQuick 3) Flickable needs to allow such
mechanic details to be controlled via QML so that platforms can easily
load custom behavior at QML compile time.
|
2407 |
- |
| qquickflipable.cpp |
!
\qmltype Flipable
\nativetype QQuickFlipable
\inqmlmodule QtQuick
\inherits Item
\ingroup qtquick-input
\ingroup qtquick-containers
\brief Provides a surface that can be flipped.
Flipable is an item that can be visibly "flipped" between its front and
back sides, like a card. It may used together with \l Rotation, \l State
and \l Transition types to produce a flipping effect.
The \l front and \l back properties are used to hold the items that are
shown respectively on the front and back sides of the flipable item.
\section1 Example Usage
The following example shows a Flipable item that flips whenever it is
clicked, rotating about the y-axis.
This flipable item has a \c flipped boolean property that is toggled
whenever the MouseArea within the flipable is clicked. When
\c flipped is true, the item changes to the "back" state; in this
state, the \c angle of the \l Rotation item is changed to 180
degrees to produce the flipping effect. When \c flipped is false, the
item reverts to the default state, in which the \c angle value is 0.
\snippet qml/flipable/flipable.qml 0
\image flipable.gif {Qt logo flipping between front and back sides
with rotation animation}
The \l Transition creates the animation that changes the angle over
four seconds. When the item changes between its "back" and
default states, the NumberAnimation animates the angle between
its old and new values.
See \l {Qt Quick States} for details on state changes and the default
state, and \l {Animation and Transitions in Qt Quick} for more information on how
animations work within transitions.
\sa {customitems/flipable}{UI Components: Flipable Example}
|
9251 |
- |
| qquickflipable_p.h |
|
1702 |
- |
| qquickfocusscope.cpp |
!
\qmltype FocusScope
\nativetype QQuickFocusScope
\inqmlmodule QtQuick
\ingroup qtquick-input
\brief Explicitly creates a focus scope.
\inherits Item
Focus scopes assist in keyboard focus handling when building reusable QML
components. All the details are covered in the
\l {Keyboard Focus in Qt Quick}{keyboard focus documentation}.
\sa {Qt Quick Examples - Key Interaction}
|
840 |
- |
| qquickfocusscope_p.h |
|
838 |
- |
| qquickframebufferobject.cpp |
!
\class QQuickFramebufferObject
\inmodule QtQuick
\since 5.2
\brief The QQuickFramebufferObject class is a convenience class
for integrating OpenGL rendering using a framebuffer object (FBO)
with Qt Quick.
\warning This class is only functional when Qt Quick is rendering via
OpenGL. It is not compatible with other graphics APIs, such as Vulkan or
Metal. It should be treated as a legacy class that is only present in order
to enable Qt 5 applications to function without source compatibility breaks
as long as they tie themselves to OpenGL.
On most platforms, the rendering will occur on a \l {Scene Graph and Rendering}{dedicated thread}.
For this reason, the QQuickFramebufferObject class enforces a strict
separation between the item implementation and the FBO rendering. All
item logic, such as properties and UI-related helper functions needed by
QML should be located in a QQuickFramebufferObject class subclass.
Everything that relates to rendering must be located in the
QQuickFramebufferObject::Renderer class.
To avoid race conditions and read/write issues from two threads
it is important that the renderer and the item never read or
write shared variables. Communication between the item and the renderer
should primarily happen via the
QQuickFramebufferObject::Renderer::synchronize() function. This function
will be called on the render thread while the GUI thread is blocked.
Using queued connections or events for communication between item
and renderer is also possible.
Both the Renderer and the FBO are memory managed internally.
To render into the FBO, the user should subclass the Renderer class
and reimplement its Renderer::render() function. The Renderer subclass
is returned from createRenderer().
The size of the FBO will by default adapt to the size of
the item. If a fixed size is preferred, set textureFollowsItemSize
to \c false and return a texture of your choosing from
QQuickFramebufferObject::Renderer::createFramebufferObject().
Starting Qt 5.4, the QQuickFramebufferObject class is a
\l{QSGTextureProvider}{texture provider}
and can be used directly in \l {ShaderEffect}{ShaderEffects} and other
classes that consume texture providers.
\sa {Scene Graph and Rendering}
|
16801 |
- |
| qquickframebufferobject.h |
|
2171 |
- |
| qquickgraphicsconfiguration.cpp |
|
37856 |
- |
| qquickgraphicsconfiguration.h |
|
1926 |
- |
| qquickgraphicsconfiguration_p.h |
|
1605 |
- |
| qquickgraphicsdevice.cpp |
!
\class QQuickGraphicsDevice
\since 6.0
\inmodule QtQuick
\brief The QQuickGraphicsDevice class provides an opaque container for
native graphics objects representing graphics devices or contexts.
\sa QQuickWindow::setGraphicsDevice(), QQuickRenderTarget
|
10378 |
- |
| qquickgraphicsdevice.h |
|
2341 |
- |
| qquickgraphicsdevice_p.h |
|
2151 |
- |
| qquickgraphicsinfo.cpp |
!
\qmltype GraphicsInfo
\nativetype QQuickGraphicsInfo
\inqmlmodule QtQuick
\ingroup qtquick-visual
\since 5.8
\since QtQuick 2.8
\brief Provides information about the scenegraph backend and the graphics API used by Qt Quick.
The GraphicsInfo attached type provides information about the scenegraph
backend and the graphics API used to render the contents of the associated window.
If the item to which the properties are attached is not currently
associated with any window, the properties are set to default values. When
the associated window changes, the properties will update.
|
9984 |
- |
| qquickgraphicsinfo_p.h |
|
5313 |
- |
| qquickgridview.cpp |
|
109536 |
- |
| qquickgridview_p.h |
|
3097 |
- |
| qquickimage.cpp |
|
35005 |
- |
| qquickimage_p.h |
|
3769 |
- |
| qquickimage_p_p.h |
|
1563 |
- |
| qquickimagebase.cpp |
|
17082 |
- |
| qquickimagebase_p.h |
|
4849 |
- |
| qquickimagebase_p_p.h |
|
2345 |
- |
| qquickimplicitsizeitem.cpp |
!
\internal
QQuickImplicitSizeItem redefines the implicitWidth and implicitHeight
properties as readonly, as some items (e.g. Image, where the implicit size
represents the real size of the image) should not be able to have their
implicit size modified.
|
770 |
- |
| qquickimplicitsizeitem_p.h |
|
1199 |
- |
| qquickimplicitsizeitem_p_p.h |
|
869 |
- |
| qquickitem.cpp |
!
\qmltype Transform
\nativetype QQuickTransform
\inqmlmodule QtQuick
\ingroup qtquick-visual-transforms
\brief For specifying advanced transformations on Items.
The Transform type is a base type which cannot be instantiated directly.
The following concrete Transform types are available:
\list
\li \l Rotation
\li \l Scale
\li \l Translate
\li \l Shear
\li \l Matrix4x4
\endlist
The Transform types let you create and control advanced transformations that can be configured
independently using specialized properties.
You can assign any number of Transforms to an \l Item. Each Transform is applied in order,
one at a time.
|
343018 |
- |
| qquickitem.h |
|
20039 |
- |
| qquickitem_p.h |
|
41497 |
- |
| qquickitemanimation.cpp |
!
\qmltype ParentAnimation
\nativetype QQuickParentAnimation
\inqmlmodule QtQuick
\ingroup qtquick-animation-properties
\since 5.0
\inherits Animation
\brief Animates changes in parent values.
ParentAnimation is used to animate a parent change for an \l Item.
For example, the following ParentChange changes \c blueRect to become
a child of \c redRect when it is clicked. The inclusion of the
ParentAnimation, which defines a NumberAnimation to be applied during
the transition, ensures the item animates smoothly as it moves to
its new parent:
\snippet qml/parentanimation.qml 0
A ParentAnimation can contain any number of animations. These animations will
be run in parallel; to run them sequentially, define them within a
SequentialAnimation.
In some cases, such as when reparenting between items with clipping enabled, it is useful
to animate the parent change via another item that does not have clipping
enabled. Such an item can be set using the \l via property.
ParentAnimation is typically used within a \l Transition in conjunction
with a ParentChange. When used in this manner, it animates any
ParentChange that has occurred during the state change. This can be
overridden by setting a specific target item using the \l target property.
\sa {Animation and Transitions in Qt Quick}, {Qt Quick Examples - Animation}
|
35649 |
- |
| qquickitemanimation_p.h |
|
5675 |
- |
| qquickitemanimation_p_p.h |
|
3693 |
- |
| qquickitemchangelistener_p.h |
oldGeometry |
7490 |
- |
| qquickitemgrabresult.cpp |
!
\qmlproperty url QtQuick::ItemGrabResult::url
This property holds a URL which can be used in conjunction with
URL based image consumers, such as the QtQuick::Image type.
The URL is valid while there is a reference in QML or JavaScript
to the ItemGrabResult or while the image the URL references is
actively used.
The URL does not represent a valid file or location to read it from, it
is primarily a key to access images through Qt Quick's image-based types.
|
16584 |
- |
| qquickitemgrabresult.h |
|
1476 |
- |
| qquickitemsmodule.cpp |
!
\qmltype PointerEvent
\nativetype QPointerEvent
\inqmlmodule QtQuick
\brief QML equivalent for \l QPointerEvent.
PointerEvent is the QML name of the QPointerEvent class.
|
9683 |
- |
| qquickitemsmodule_p.h |
|
1708 |
- |
| qquickitemview.cpp |
|
97769 |
- |
| qquickitemview_p.h |
|
14815 |
- |
| qquickitemview_p_p.h |
|
13550 |
- |
| qquickitemviewfxitem.cpp |
|
4412 |
- |
| qquickitemviewfxitem_p_p.h |
|
2632 |
- |
| qquickitemviewtransition.cpp |
|
38364 |
- |
| qquickitemviewtransition_p.h |
An item that can be transitioned using QQuickViewTransitionJob.
|
6494 |
- |
| qquicklistview.cpp |
|
173476 |
- |
| qquicklistview_p.h |
|
6680 |
- |
| qquickloader.cpp |
|
30758 |
- |
| qquickloader_p.h |
|
2906 |
- |
| qquickloader_p_p.h |
|
2733 |
- |
| qquickmousearea.cpp |
|
51456 |
- |
| qquickmousearea_p.h |
|
5867 |
- |
| qquickmousearea_p_p.h |
|
2235 |
- |
| qquickmultipointtoucharea.cpp |
!
\qmltype TouchPoint
\nativetype QQuickTouchPoint
\inqmlmodule QtQuick
\ingroup qtquick-input-events
\brief Describes a touch point in a MultiPointTouchArea.
The TouchPoint type contains information about a touch point, such as the current
position, pressure, and area.
\image touchpoint-metrics.png {Tablet showing touch points with
metrics: bounding box, rotation, and ellipse diameters}
|
35585 |
- |
| qquickmultipointtoucharea_p.h |
|
10622 |
- |
| qquickpainteditem.cpp |
!
\class QQuickPaintedItem
\brief The QQuickPaintedItem class provides a way to use the QPainter API in the
QML Scene Graph.
\inmodule QtQuick
The QQuickPaintedItem makes it possible to use the QPainter API with the QML
Scene Graph. It sets up a textured rectangle in the Scene Graph and uses a
QPainter to paint onto the texture. The render target in Qt 6 is always a
QImage. When the render target is a QImage, QPainter first renders into the
image then the content is uploaded to the texture. Call update() to trigger
a repaint.
To enable QPainter to do anti-aliased rendering, use setAntialiasing().
To write your own painted item, you first create a subclass of
QQuickPaintedItem, and then start by implementing its only pure virtual
public function: paint(), which implements the actual painting. The
painting will be inside the rectangle spanning from 0,0 to
width(),height().
\note It important to understand the performance implications such items
can incur. See QQuickPaintedItem::RenderTarget and
QQuickPaintedItem::renderTarget.
\sa {Scene Graph - Painted Item}, {Writing QML Extensions with C++}
|
17954 |
- |
| qquickpainteditem.h |
|
3256 |
- |
| qquickpainteditem_p.h |
|
1237 |
- |
| qquickpalette.cpp |
!
\internal
\class QQuickPalette
\brief Contains color groups for each QML item state.
\inmodule QtQuick
\since 6.0
This class is the wrapper around QPalette.
\sa QQuickColorGroup, QQuickAbstractPaletteProvider, QPalette
|
8949 |
- |
| qquickpalette_p.h |
|
3040 |
- |
| qquickpalettecolorprovider.cpp |
! \internal
Merge the given \a palette with the existing requested palette, remember
that it is the inherited palette (in case updateInheritedPalette() is
called later), and update the stored palette (to be returned from
\l palette()) if the result is different. Returns whether the stored
palette got changed.
|
6924 |
- |
| qquickpalettecolorprovider_p.h |
|
2093 |
- |
| qquickpaletteproviderprivatebase_p.h |
!
\internal
Implements all required operations with palette.
I -- is interface class (e.g. QQuickItem).
Impl -- is implementation class (e.g. QQuickItemPrivate).
To use this class you need to inherit implementation class from it.
|
11817 |
- |
| qquickpathview.cpp |
|
84890 |
- |
| qquickpathview_p.h |
|
8966 |
- |
| qquickpathview_p_p.h |
|
5279 |
- |
| qquickpincharea.cpp |
!
\qmltype PinchEvent
\nativetype QQuickPinchEvent
\inqmlmodule QtQuick
\ingroup qtquick-input-events
\brief For specifying information about a pinch event.
The \c center, \c startCenter, \c previousCenter properties provide the center position between the two touch points.
The \c scale and \c previousScale properties provide the scale factor.
The \c angle, \c previousAngle and \c rotation properties provide the angle between the two points and the amount of rotation.
The \c point1, \c point2, \c startPoint1, \c startPoint2 properties provide the positions of the touch points.
The \c accepted property may be set to false in the \c onPinchStarted handler if the gesture should not
be handled.
\sa PinchArea
|
31782 |
- |
| qquickpincharea_p.h |
|
8733 |
- |
| qquickpincharea_p_p.h |
|
1741 |
- |
| qquickpositioners.cpp |
!
\internal
\class QQuickBasePositioner
\brief For specifying a base for QQuickGraphics layouts
To create a QQuickGraphics Positioner, simply subclass QQuickBasePositioner and implement
doLayout(), which is automatically called when the layout might need
updating. In doLayout() use the setX and setY functions from QQuickBasePositioner, and the
base class will apply the positions along with the appropriate transitions. The items to
position are provided in order as the protected member positionedItems.
You also need to set a PositionerType, to declare whether you are positioning the x, y or both
for the child items. Depending on the chosen type, only x or y changes will be applied.
Note that the subclass is responsible for adding the spacing in between items.
Positioning is batched and synchronized with painting to reduce the number of
calculations needed. This means that positioners may not reposition items immediately
when changes occur, but it will have moved by the next frame.
|
75182 |
- |
| qquickpositioners_p.h |
|
12542 |
- |
| qquickpositioners_p_p.h |
|
4375 |
- |
| qquickrectangle.cpp |
!
\internal
\class QQuickPen
\brief For specifying a pen used for drawing rectangle borders on a QQuickView
By default, the pen is invalid and nothing is drawn. You must either set a color (then the default
width is 1) or a width (then the default color is black).
A width of 1 indicates is a single-pixel line on the border of the item being painted.
Example:
\qml
Rectangle {
border.width: 2
border.color: "red"
}
\endqml
|
26647 |
- |
| qquickrectangle_p.h |
|
5518 |
- |
| qquickrectangle_p_p.h |
|
1863 |
- |
| qquickrendercontrol.cpp |
!
\class QQuickRenderControl
\brief The QQuickRenderControl class provides a mechanism for rendering the Qt
Quick scenegraph onto an offscreen render target in a fully
application-controlled manner.
\since 5.4
QQuickWindow and QQuickView and their associated internal render loops render
the Qt Quick scene onto a native window. In some cases, for example when
integrating with 3rd party OpenGL, Vulkan, Metal, or Direct 3D renderers, it
can be useful to get the scene into a texture that can then be used in
arbitrary ways by the external rendering engine. Such a mechanism is also
essential when integrating with a VR framework. QQuickRenderControl makes this
possible in a hardware accelerated manner, unlike the performance-wise limited
alternative of using QQuickWindow::grabWindow()
When using a QQuickRenderControl, the QQuickWindow must not be
\l{QWindow::show()}{shown} (it will not be visible on-screen) and there will
not be an underlying native window for it. Instead, the QQuickWindow instance
is associated with the render control object, using the overload of the
QQuickWindow constructor, and a texture or image object specified via
QQuickWindow::setRenderTarget(). The QQuickWindow object is still essential,
because it represents the Qt Quick scene and provides the bulk of the scene
management and event delivery mechanisms. It does not however act as a real
on-screen window from the windowing system's perspective.
Management of the graphics devices, contexts, image and texture objects is up
to the application. The device or context that will be used by Qt Quick must
be created before calling initialize(). The creation of the texture object
can be deferred, see below. Qt 5.4 introduces the ability for QOpenGLContext
to adopt existing native contexts. Together with QQuickRenderControl this
makes it possible to create a QOpenGLContext that shares with an external
rendering engine's existing context. This new QOpenGLContext can then be used
to render the Qt Quick scene into a texture that is accessible by the other
engine's context too. For Vulkan, Metal, and Direct 3D there are no
Qt-provided wrappers for device objects, so existing ones can be passed as-is
via QQuickWindow::setGraphicsDevice().
Loading and instantiation of the QML components happen by using a
QQmlEngine. Once the root object is created, it will need to be parented to
the QQuickWindow's contentItem().
Applications will usually have to connect to 4 important signals:
\list
\li QQuickWindow::sceneGraphInitialized() Emitted at some point after calling
QQuickRenderControl::initialize(). Upon this signal, the application is
expected to create its framebuffer object and associate it with the
QQuickWindow.
\li QQuickWindow::sceneGraphInvalidated() When the scenegraph resources are
released, the framebuffer object can be destroyed too.
\li QQuickRenderControl::renderRequested() Indicates that the scene has to be
rendered by calling render(). After making the context current, applications
are expected to call render().
\li QQuickRenderControl::sceneChanged() Indicates that the scene has changed
meaning that, before rendering, polishing and synchronizing is also necessary.
\endlist
To send events, for example mouse or keyboard events, to the scene, use
QCoreApplication::sendEvent() with the QQuickWindow instance as the receiver.
For key events it may be also necessary to set the focus manually on the
desired item. In practice this involves calling
\l{QQuickItem::forceActiveFocus()}{forceActiveFocus()} on the desired item,
for example the scene's root item, once it is associated with the scene (the
QQuickWindow).
\inmodule QtQuick
|
28876 |
- |
| qquickrendercontrol.h |
|
1492 |
- |
| qquickrendercontrol_p.h |
|
1925 |
- |
| qquickrendertarget.cpp |
!
\class QQuickRenderTarget
\since 6.0
\inmodule QtQuick
\brief The QQuickRenderTarget class provides an opaque container for native
graphics resources specifying a render target, and associated metadata.
\sa QQuickWindow::setRenderTarget(), QQuickGraphicsDevice
|
74909 |
- |
| qquickrendertarget.h |
|
4104 |
- |
| qquickrendertarget_p.h |
|
2182 |
- |
| qquickrepeater.cpp |
!
\qmltype Repeater
\nativetype QQuickRepeater
\inqmlmodule QtQuick
\ingroup qtquick-models
\ingroup qtquick-positioning
\inherits Item
\brief Instantiates a number of Item-based components using a provided model.
The Repeater type is used to create a large number of
similar items. Like other view types, a Repeater has a \l model and a \l delegate:
for each entry in the model, the delegate is instantiated
in a context seeded with data from the model. A Repeater item is usually
enclosed in a positioner type such as \l Row or \l Column to visually
position the multiple delegate items created by the Repeater.
The following Repeater creates three instances of a \l Rectangle item within
a \l Row:
\snippet qml/repeaters/repeater.qml import
\codeline
\snippet qml/repeaters/repeater.qml simple
\image repeater-simple.png {Three yellow rectangles in a row created
by Repeater}
A Repeater's \l model can be any of the supported \l {qml-data-models}{data models}.
Additionally, like delegates for other views, a Repeater delegate can access
its index within the repeater, as well as the model data relevant to the
delegate. See the \l delegate property documentation for details.
Items instantiated by the Repeater are inserted, in order, as
children of the Repeater's parent. The insertion starts immediately after
the repeater's position in its parent stacking list. This allows
a Repeater to be used inside a layout. For example, the following Repeater's
items are stacked between a red rectangle and a blue rectangle:
\snippet qml/repeaters/repeater.qml layout
\image repeater.png {Row with red rectangle, ten green circles from
Repeater, and blue rectangle}
\note A Repeater item owns all items it instantiates. Removing or dynamically destroying
an item created by a Repeater results in unpredictable behavior.
\section2 Considerations when using Repeater
The Repeater type creates all of its delegate items when the repeater is first
created. This can be inefficient if there are a large number of delegate items and
not all of the items are required to be visible at the same time. If this is the case,
consider using other view types like ListView (which only creates delegate items
when they are scrolled into view) or use the \l {Dynamic Object Creation} methods to
create items as they are required.
Also, note that Repeater is \l {Item}-based, and can only repeat \l {Item}-derived objects.
For example, it cannot be used to repeat QtObjects:
\qml
// bad code:
Item {
// Can't repeat QtObject as it doesn't derive from Item.
Repeater {
model: 10
QtObject {}
}
}
\endqml
|
24414 |
- |
| qquickrepeater_p.h |
|
2545 |
- |
| qquickrepeater_p_p.h |
|
1649 |
- |
| qquickrhiitem.cpp |
|
46263 |
- |
| qquickrhiitem.h |
|
3995 |
- |
| qquickrhiitem_p.h |
|
2668 |
- |
| qquicksafearea.cpp |
!
\qmltype SafeArea
\nativetype QQuickSafeArea
\inqmlmodule QtQuick
\ingroup qtquick-visual
\since 6.9
\brief Provides access to the safe area properties of the item or window.
The SafeArea attached type provides information about the areas of
an Item or Window where content may risk being overlapped by other
UI elements, such as system title bars or status bars.
This information can be used to lay out children of an item within
the safe area of the item, while still allowing a background color
or effect to span the entire item.
\table
\row
\li \snippet qml/safearea/basic.qml 0
\li \inlineimage safearea-ios.webp
{iPhone showing content respecting safe area margins}
\endtable
The SafeArea margins are relative to the item they attach to. If an
ancestor item has laid out its children within the safe area margins,
any descendant item with its own SafeArea attached will report zero
margins, unless \l{Additional margins}{additional margins} have been
added.
\note An item should not be positioned based on \e{its own} safe area,
as that would result in a binding loop.
\section2 Additional margins
Sometimes an item's layout involves child items that overlap each other,
for example in a window with a semi transparent header, where the rest
of the window content flows underneath the header.
In this scenario, the item may reflect the header's position and size
to the child items via the additionalMargins property.
The additional margins will be added to any margins that the
item already picks up from its parent hierarchy (including system
margins, such as title bars or status bars), and child items will
reflect the combined margins accordingly.
\table
\row
\li \snippet qml/safearea/additional.qml 0
\li \br \inlineimage safearea-ios-header.webp
{iPhone with header adding additional safe area margin}
\endtable
In the example above, the header item is positioned at the top of
the window, which may potentially overlap with existing safe area
margins coming from the window. To account for this we only add
additional margins for the part of the header that extends beyond
the window's safe area margins.
\note In this example the header item does not overlap the child item,
as the goal is to show how the items are positioned and resized in
response to safe area margin changes.
\section2 Controls
Applying safe area margins to a Control is straightforward,
as Control already offers properties to add padding to the
control's content item.
\snippet qml/safearea/controls.qml 0
|
15819 |
- |
| qquicksafearea_p.h |
|
2786 |
- |
| qquickscalegrid.cpp |
!
\internal
\class QQuickScaleGrid
\brief The QQuickScaleGrid class allows you to specify a 3x3 grid to use in scaling an image.
|
4931 |
- |
| qquickscalegrid_p_p.h |
|
2551 |
- |
| qquickscreen.cpp |
!
\qmltype Screen
\nativetype QQuickScreenAttached
\inqmlmodule QtQuick
\ingroup qtquick-visual-utility
\brief The Screen attached object provides information about the Screen an Item or Window is displayed on.
The Screen attached object is valid inside Item or Item derived types,
after component completion. Inside these items it refers to the screen that
the item is currently being displayed on.
The attached object is also valid inside Window or Window derived types,
after component completion. In that case it refers to the screen where the
Window was created. It is generally better to access the Screen from the
relevant Item instead, because on a multi-screen desktop computer, the user
can drag a Window into a position where it spans across multiple screens.
In that case some Items will be on one screen, and others on a different
screen.
To use this type, you will need to import the module with the following line:
\code
import QtQuick.Window 2.2
\endcode
It is a separate import in order to allow you to have a QML environment
without access to window system features.
Note that the Screen type is not valid at Component.onCompleted, because
the Item or Window has not been displayed on a screen by this time.
\sa {Qt Quick Examples - Window and Screen}
|
15303 |
- |
| qquickscreen_p.h |
|
5234 |
- |
| qquickselectable_p.h |
|
1414 |
- |
| qquickshadereffect.cpp |
|
59204 |
- |
| qquickshadereffect_p.h |
|
3258 |
- |
| qquickshadereffect_p_p.h |
|
4136 |
- |
| qquickshadereffectmesh.cpp |
!
\qmltype GridMesh
\nativetype QQuickGridMesh
\inqmlmodule QtQuick
\since 5.0
\ingroup qtquick-effects
\brief Defines a mesh with vertices arranged in a grid.
GridMesh defines a rectangular mesh consisting of vertices arranged in an
evenly spaced grid. It is used to generate \l{QSGGeometry}{geometry}.
The grid resolution is specified with the \l resolution property.
|
12693 |
- |
| qquickshadereffectmesh_p.h |
|
4442 |
- |
| qquickshadereffectsource.cpp |
|
26759 |
- |
| qquickshadereffectsource_p.h |
|
5228 |
- |
| qquicksprite.cpp |
!
\qmltype Sprite
\nativetype QQuickSprite
\inqmlmodule QtQuick
\ingroup qtquick-visual-utility
\brief Specifies sprite animations.
Sprite defines a series of one or more frames to be animated and rendered by SpriteSequence.
The sprites can be in the middle of an image file, or split along multiple rows, as long as they form
a contiguous line wrapping to the next row of the file from the left edge of the file.
For full details, see the \l{Sprite Animations} overview.
|
8506 |
- |
| qquicksprite_p.h |
|
7297 |
- |
| qquickspriteengine.cpp |
\internal Stochastic/Sprite engine implementation docs
Nomenclature: 'thing' refers to an instance of a running sprite or state. It could be renamed.
States and Transitions are referred to in the state machine sense here, NOT in the QML sense.
The Stochastic State engine takes states with stochastic state transitions defined and transitions them.
When a state is started, it's added to a list of pending updates sorted by their time they want to update.
An external driver calls the update function with an elapsed time, which becomes the new time offset.
The pending update stack is popped until all entries are past the current time, which simulates all intervening time.
The Sprite Engine subclass has two major differences. Firstly all states are sprites (and there's a new vector with them
cast to sprite). Secondly, it chops up images and states to fit a texture friendly format.
Before the Sprite Engine starts running, its user requests a texture assembled from all the sprite images. This
texture is made by pasting the sprites into one image, with one sprite animation per row (in the future it is planned to have
arbitrary X/Y start ends, but they will still be assembled and recorded here and still have to be contiguous lines).
This cut-up allows the users to calcuate frame positions with a texture percentage width and elapsed time.
It also means that large sprites cover multiple lines to fit inside the texture memory limit (which is a square).
Large sprites covering multiple lines breaks this simple interface for the users, so each line is treated as a pseudostate
and it's mostly hidden from the spriteengine users (except that they'll get advanced signals where the state is the same
but the visual parameters changed). These are not real states because that would get very complex with bindings. Instead,
when sprite attributes are requested from a sprite that has multiple pseudostates, it returns the values for the psuedostate
it is in. State advancement is intercepted and hollow for pseudostates, except the last one. The last one transitions as the
state normally does.
|
28236 |
- |
| qquickspriteengine_p.h |
|
9080 |
- |
| qquickspritesequence.cpp |
!
\qmltype SpriteSequence
\nativetype QQuickSpriteSequence
\inqmlmodule QtQuick
\ingroup qtquick-visual-utility
\inherits Item
\brief Draws a sprite animation.
SpriteSequence renders and controls a list of animations defined
by \l Sprite types.
For full details, see the \l{Sprite Animations} overview.
\sa {Sprite animations with SpriteSequence}
|
9200 |
- |
| qquickspritesequence_p.h |
|
2378 |
- |
| qquickspritesequence_p_p.h |
|
1392 |
- |
| qquickstateoperations.cpp |
|
47617 |
- |
| qquickstateoperations_p.h |
|
5953 |
- |
| qquicktableview.cpp |
|
312576 |
- |
| qquicktableview_p.h |
|
15362 |
- |
| qquicktableview_p_p.h |
! \internal
TableView uses QQuickTableViewHoverHandler to track where the pointer is
on top of the table, and change the cursor at the places where a drag
would start a resize of a row or a column.
|
28153 |
- |
| qquicktext.cpp |
|
118618 |
- |
| qquicktext_p.h |
|
13663 |
- |
| qquicktext_p_p.h |
|
6737 |
- |
| qquicktextcontrol.cpp |
|
61879 |
- |
| qquicktextcontrol_p.h |
|
5428 |
- |
| qquicktextcontrol_p_p.h |
|
4224 |
- |
| qquicktextdocument.cpp |
!
\qmltype TextDocument
\nativetype QQuickTextDocument
\inqmlmodule QtQuick
\brief A wrapper around TextEdit's backing QTextDocument.
\preliminary
To load text into the document, set the \l source property. If the user then
modifies the text and wants to save the same document, call \l save() to save
it to the same source again (only if \l {QUrl::isLocalFile()}{it's a local file}).
Or call \l saveAs() to save it to a different file.
This class cannot be instantiated in QML, but is available from \l TextEdit::textDocument.
\note All loading and saving is done synchronously for now.
This may block the UI if the \l source is a slow network drive.
This may be improved in future versions of Qt.
\note This API is considered tech preview and may change in future versions of Qt.
|
20956 |
- |
| qquicktextdocument.h |
|
1980 |
- |
| qquicktextdocument_p.h |
! \internal
QTextImageHandler would attempt to resolve relative paths, and load the
image itself if the document returns an invalid image from loadResource().
We replace it with this version instead, because Qt Quick's text resources
are resolved against the Text item's context, and because we override
intrinsicSize(). drawObject() is empty because we don't need to use this
handler to paint images: they get put into scene graph nodes instead.
|
3041 |
- |
| qquicktextedit.cpp |
!
\qmltype TextEdit
\nativetype QQuickTextEdit
\inqmlmodule QtQuick
\ingroup qtquick-visual
\ingroup qtquick-input
\inherits Item
\brief Displays multiple lines of editable formatted text.
The TextEdit item displays a block of editable, formatted text.
It can display both plain and rich text. For example:
\qml
TextEdit {
width: 240
text: "<b>Hello</b> <i>World!</i>"
font.family: "Helvetica"
font.pointSize: 20
color: "blue"
focus: true
}
\endqml
\image declarative-textedit.gif {"Hello World!" text editing
demonstration}
Setting \l {Item::focus}{focus} to \c true enables the TextEdit item to receive keyboard focus.
Note that the TextEdit does not implement scrolling, following the cursor, or other behaviors specific
to a look and feel. For example, to add flickable scrolling that follows the cursor:
\snippet qml/texteditor.qml 0
A particular look and feel might use smooth scrolling (eg. using SmoothedAnimation), might have a visible
scrollbar, or a scrollbar that fades in to show location, etc.
Clipboard support is provided by the cut(), copy(), and paste() functions.
Text can be selected by mouse in the usual way, unless \l selectByMouse is
set to \c false; and by keyboard with the \c {Shift+arrow} key
combinations, unless \l selectByKeyboard is set to \c false. To select text
programmatically, you can set the \l selectionStart and \l selectionEnd
properties, or use \l selectAll() or \l selectWord().
You can translate between cursor positions (characters from the start of the document) and pixel
points using positionAt() and positionToRectangle().
\sa Text, TextInput, TextArea, {Qt Quick Controls - Text Editor}
|
131101 |
- |
| qquicktextedit_p.h |
|
16592 |
- |
| qquicktextedit_p_p.h |
|
7544 |
- |
| qquicktextinput.cpp |
!
\qmltype TextInput
\nativetype QQuickTextInput
\inqmlmodule QtQuick
\ingroup qtquick-visual
\ingroup qtquick-input
\inherits Item
\brief Displays an editable line of text.
The TextInput type displays a single line of editable plain text.
TextInput is used to accept a line of text input. Input constraints
can be placed on a TextInput item (for example, through a \l validator or \l inputMask),
and setting \l echoMode to an appropriate value enables TextInput to be used for
a password input field.
To react to the user accepting text via the Return or Enter keys, handle
the \l accepted() signal. When Return or Enter are pressed and the text
input loses focus, \l editingFinished() will be emitted. When the text is
edited in any way by the user, \l textEdited() is emitted. These signals
\l {Property change signals}{should be preferred} over \c textChanged()
in most cases.
On \macos, the Up/Down key bindings for Home/End are explicitly disabled.
If you want such bindings (on any platform), you will need to construct them in QML.
\sa TextEdit, Text
|
155919 |
- |
| qquicktextinput_p.h |
|
15343 |
- |
| qquicktextinput_p_p.h |
|
16274 |
- |
| qquicktextinterface_p.h |
|
805 |
- |
| qquicktextnodeengine.cpp |
|
53475 |
- |
| qquicktextnodeengine_p.h |
|
9251 |
- |
| qquicktextutil.cpp |
|
2577 |
- |
| qquicktextutil_p.h |
|
3019 |
- |
| qquicktranslate.cpp |
!
\qmltype Translate
\nativetype QQuickTranslate
\inqmlmodule QtQuick
\ingroup qtquick-visual-transforms
\brief Provides a way to move an Item without changing its x or y properties.
The Translate type provides independent control over position in addition
to the Item's x and y properties.
The following example moves the Y axis of the \l Rectangle items while
still allowing the \l Row to lay the items out as if they had not been
transformed:
\qml
import QtQuick 2.0
Row {
Rectangle {
width: 100; height: 100
color: "blue"
transform: Translate { y: 20 }
}
Rectangle {
width: 100; height: 100
color: "red"
transform: Translate { y: -20 }
}
}
\endqml
\image translate.png {Blue and red rectangles, with red translated
20 pixels upward}
|
18127 |
- |
| qquicktranslate_p.h |
|
5088 |
- |
| qquicktreeview.cpp |
|
25894 |
- |
| qquicktreeview_p.h |
|
2242 |
- |
| qquicktreeview_p_p.h |
|
1520 |
- |
| qquickview.cpp |
!
\class QQuickView
\since 5.0
\brief The QQuickView class provides a window for displaying a Qt Quick user interface.
\inmodule QtQuick
This is a convenience subclass of QQuickWindow which
will automatically load and display a QML scene when given the URL of the main source file. Alternatively,
you can instantiate your own objects using QQmlComponent and place them in a manually setup QQuickWindow.
Typical usage:
\snippet qquickview-ex.cpp 0
To receive errors related to loading and executing QML with QQuickView,
you can connect to the statusChanged() signal and monitor for QQuickView::Error.
The errors are available via QQuickView::errors().
QQuickView also manages sizing of the view and root object. By default, the \l resizeMode
is SizeViewToRootObject, which will load the component and resize it to the
size of the view. Alternatively the resizeMode may be set to SizeRootObjectToView which
will resize the view to the size of the root object.
\sa {Exposing Attributes of C++ Types to QML}, QQuickWidget
|
19189 |
- |
| qquickview.h |
|
2424 |
- |
| qquickview_p.h |
|
2022 |
- |
| qquickwindow.cpp |
!
Returns an accessibility interface for this window, or 0 if such an
interface cannot be created.
|
177631 |
- |
| qquickwindow.h |
|
8518 |
- |
| qquickwindow_p.h |
|
10683 |
- |
| qquickwindowattached.cpp |
|
3772 |
- |
| qquickwindowattached_p.h |
|
1974 |
- |
| qquickwindowcontainer.cpp |
!
\qmltype WindowContainer
\inqmlmodule QtQuick
\ingroup qtquick-visual
\inherits Item
\since 6.8
\brief Allows embedding arbitrary QWindows into a Qt Quick scene.
The window will become a child of the item's window,
with its position, size, z-order, etc. managed by the item.
Sibling items with a higher z-order than the window container
will not automatically overlap the embedded window, as the
window lives on top of the Qt Quick scene. To work around this,
place the sibling items inside their own dedicated child window:
\code
Item {
id: someItem
WindowContainer {
window: foreignWindow
}
WindowContainer {
window: Window {
Item {
id: siblingItem
}
}
}
}
\endcode
Similarly, child Items of the window container will not automatically
overlap the embedded window. To work around this, place the child
item inside a dedicated child window.
\code
Item {
id: someItem
WindowContainer {
id: windowContainer
window: foreignWindow
WindowContainer {
window: Window {
Item {
id: childItem
}
}
}
}
}
\endcode
\note The window container does not interoperate with QQuickWidget,
QQuickWindow::setRenderTarget(), QQuickRenderControl, or similar
functionality.
\sa {QQuickWindow::}{parent()}
|
22558 |
- |
| qquickwindowcontainer_p.h |
|
2252 |
- |
| qquickwindowmodule.cpp |
|
20726 |
- |
| qquickwindowmodule_p.h |
|
2722 |
- |
| qquickwindowmodule_p_p.h |
|
1326 |
- |
| qsginternaltextnode.cpp |
!
\class QSGInternalTextNode
\inmodule QtQuick
\internal
Creates an empty QSGInternalTextNode
|
20903 |
- |
| qsginternaltextnode_p.h |
|
9569 |
- |
| syncexcludes |
|
277 |
- |