Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuickItem Class Reference

The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}. More...

#include <qquickitem.h>

Inherits QObject, and QQmlParserStatus.

Inherited by QDeclarativeGeoMap, QDeclarativeGeoMapItemBase, QDeclarativeGeoMapItemGroup, QGfxSourceProxy, QQuick3DViewport, QQuickAnimatedSprite, QQuickBasicBusyIndicator, QQuickBasicProgressBar, QQuickCanvasItem, QQuickColorInputs, QQuickContentItem, QQuickControl, QQuickDropArea, QQuickFlickable, QQuickFlickableContentItem, QQuickFlipable, QQuickFocusScope, QQuickFramebufferObject, QQuickIconLabel, QQuickImplicitSizeItem, QQuickLayout, QQuickLayoutItemProxy, QQuickMaterialBusyIndicator, QQuickMaterialProgressBar, QQuickMaterialRipple, QQuickMouseArea, QQuickMultiEffect, QQuickMultiPointTouchArea, QQuickOverlay, QQuickPaintedItem, QQuickParticleAffector, QQuickParticleEmitter, QQuickParticlePainter, QQuickParticleSystem, QQuickPathView, QQuickPdfSelection, QQuickPinchArea, QQuickRectangle, QQuickRepeater, QQuickRhiItem, QQuickRootItem, QQuickShaderEffect, QQuickShaderEffectSource, QQuickShape, QQuickSpriteSequence, QQuickStyleItem, QQuickTumblerView, QQuickUniversalBusyIndicator, QQuickUniversalProgressBar, QQuickVectorImage, QQuickVectorImageGenerator::Utils::ViewBoxItem, QQuickVideoOutput, QWaylandMouseTracker, QWaylandQtShellChrome, and QWaylandQuickItem.

+ Collaboration diagram for QQuickItem:

Classes

class  ItemChangeData
 \inmodule QtQuick More...
 
struct  UpdatePaintNodeData
 

Public Types

enum  Flag {
  ItemClipsChildrenToShape = 0x01 , ItemIsFocusScope = 0x04 , ItemHasContents = 0x08 , ItemAcceptsDrops = 0x10 ,
  ItemIsViewport = 0x20 , ItemObservesViewport = 0x40
}
 \qmltype Item \instantiates QQuickItem \inherits QtObject \inqmlmodule QtQuick More...
 
enum  ItemChange {
  ItemChildAddedChange , ItemChildRemovedChange , ItemSceneChange , ItemVisibleHasChanged ,
  ItemParentHasChanged , ItemOpacityHasChanged , ItemActiveFocusHasChanged , ItemRotationHasChanged ,
  ItemAntialiasingHasChanged , ItemDevicePixelRatioHasChanged , ItemEnabledHasChanged
}
 Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes. More...
 
enum  TransformOrigin {
  TopLeft , Top , TopRight , Left ,
  Center , Right , BottomLeft , Bottom ,
  BottomRight
}
 \variable QQuickItem::ItemChangeData::realValue The numeric value that has changed: \l {QQuickItem::opacity()}{opacity}, \l {QQuickItem::rotation()}{rotation}, or \l {QScreen::devicePixelRatio}{device pixel ratio}. More...
 

Public Slots

void update ()
 Schedules a call to updatePaintNode() for this item.
 
- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 

Signals

void childrenRectChanged (const QRectF &)
 
void baselineOffsetChanged (qreal)
 
void stateChanged (const QString &)
 
void focusChanged (bool)
 
void activeFocusChanged (bool)
 
Q_REVISION(6, 7) void focusPolicyChanged(Qt Q_REVISION (2, 1) void activeFocusOnTabChanged(bool)
 
void parentChanged (QQuickItem *)
 
void transformOriginChanged (TransformOrigin)
 
void smoothChanged (bool)
 
void antialiasingChanged (bool)
 
void clipChanged (bool)
 
 Q_REVISION (2, 1) void windowChanged(QQuickWindow *window)
 
void childrenChanged ()
 
void opacityChanged ()
 
void enabledChanged ()
 
void visibleChanged ()
 
void visibleChildrenChanged ()
 
void rotationChanged ()
 
void scaleChanged ()
 
void xChanged ()
 
void yChanged ()
 
void widthChanged ()
 
void heightChanged ()
 
void zChanged ()
 
void implicitWidthChanged ()
 
void implicitHeightChanged ()
 
 Q_REVISION (2, 11) void containmentMaskChanged()
 
 Q_REVISION (6, 0) void paletteChanged()
 
 Q_REVISION (6, 0) void paletteCreated()
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 

Public Member Functions

 QQuickItem (QQuickItem *parent=nullptr)
 Constructs a QQuickItem with the given parent.
 
 ~QQuickItem () override
 Destroys the QQuickItem.
 
QQuickWindowwindow () const
 Returns the window in which this item is rendered.
 
QQuickItemparentItem () const
 
void setParentItem (QQuickItem *parent)
 
void stackBefore (const QQuickItem *)
 Moves the specified sibling item to the index before this item within the list of children.
 
void stackAfter (const QQuickItem *)
 Moves the specified sibling item to the index after this item within the list of children.
 
QRectF childrenRect ()
 \qmlpropertygroup QtQuick::Item::childrenRect \qmlproperty real QtQuick::Item::childrenRect.x \qmlproperty real QtQuick::Item::childrenRect.y \qmlproperty real QtQuick::Item::childrenRect.width \qmlproperty real QtQuick::Item::childrenRect.height \readonly
 
QList< QQuickItem * > childItems () const
 Returns the children of this item.
 
bool clip () const
 \qmlproperty bool QtQuick::Item::clip This property holds whether clipping is enabled.
 
void setClip (bool)
 
QString state () const
 \qmlproperty string QtQuick::Item::state
 
void setState (const QString &)
 
qreal baselineOffset () const
 \qmlproperty int QtQuick::Item::baselineOffset
 
void setBaselineOffset (qreal)
 
QQmlListProperty< QQuickTransformtransform ()
 
qreal x () const
 
qreal y () const
 
QPointF position () const
 
void setX (qreal)
 
void setY (qreal)
 
void setPosition (const QPointF &)
 
QBindable< qrealbindableX ()
 
QBindable< qrealbindableY ()
 
qreal width () const
 
void setWidth (qreal)
 
void resetWidth ()
 
void setImplicitWidth (qreal)
 
qreal implicitWidth () const
 Returns the width of the item that is implied by other properties that determine the content.
 
QBindable< qrealbindableWidth ()
 
qreal height () const
 
void setHeight (qreal)
 
void resetHeight ()
 
void setImplicitHeight (qreal)
 
qreal implicitHeight () const
 
QBindable< qrealbindableHeight ()
 
QSizeF size () const
 
void setSize (const QSizeF &size)
 
TransformOrigin transformOrigin () const
 
void setTransformOrigin (TransformOrigin)
 
QPointF transformOriginPoint () const
 
void setTransformOriginPoint (const QPointF &)
 
qreal z () const
 
void setZ (qreal)
 
qreal rotation () const
 
void setRotation (qreal)
 
qreal scale () const
 
void setScale (qreal)
 
qreal opacity () const
 
void setOpacity (qreal)
 
bool isVisible () const
 
void setVisible (bool)
 
bool isEnabled () const
 
void setEnabled (bool)
 
bool smooth () const
 
void setSmooth (bool)
 
bool activeFocusOnTab () const
 \qmlproperty bool QtQuick::Item::activeFocusOnTab
 
void setActiveFocusOnTab (bool)
 
bool antialiasing () const
 
void setAntialiasing (bool)
 
void resetAntialiasing ()
 
Flags flags () const
 Returns the item flags for this item.
 
void setFlag (Flag flag, bool enabled=true)
 Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disabled.
 
void setFlags (Flags flags)
 Enables the specified flags for this item.
 
virtual QRectF boundingRect () const
 Returns the extents of the item in its own coordinate system: a rectangle from {0, 0} to \l width() and \l height().
 
virtual QRectF clipRect () const
 Returns the rectangular area within this item that is currently visible in \l viewportItem(), if there is a viewport and the \l ItemObservesViewport flag is set; otherwise, the extents of this item in its own coordinate system: a rectangle from {0, 0} to \l width() and \l height().
 
QQuickItemviewportItem () const
 If the \l ItemObservesViewport flag is set, returns the nearest parent with the \l ItemIsViewport flag.
 
bool hasActiveFocus () const
 
bool hasFocus () const
 
void setFocus (bool)
 
void setFocus (bool focus, Qt::FocusReason reason)
 
bool isFocusScope () const
 Returns true if this item is a focus scope, and false otherwise.
 
QQuickItemscopedFocusItem () const
 If this item is a focus scope, this returns the item in its focus chain that currently has focus.
 
Qt::FocusPolicy focusPolicy () const
 
void setFocusPolicy (Qt::FocusPolicy policy)
 Sets the focus policy of this item to policy.
 
bool isAncestorOf (const QQuickItem *child) const
 Returns true if this item is an ancestor of child (i.e., if this item is child's parent, or one of child's parent's ancestors).
 
Qt::MouseButtons acceptedMouseButtons () const
 Returns the mouse buttons accepted by this item.
 
void setAcceptedMouseButtons (Qt::MouseButtons buttons)
 Sets the mouse buttons accepted by this item to buttons.
 
bool acceptHoverEvents () const
 Returns whether hover events are accepted by this item.
 
void setAcceptHoverEvents (bool enabled)
 If enabled is true, this sets the item to accept hover events; otherwise, hover events are not accepted by this item.
 
bool acceptTouchEvents () const
 Returns whether touch events are accepted by this item.
 
void setAcceptTouchEvents (bool accept)
 If enabled is true, this sets the item to accept touch events; otherwise, touch events are not accepted by this item.
 
bool isUnderMouse () const
 
void grabMouse ()
 
void ungrabMouse ()
 
bool keepMouseGrab () const
 Returns whether mouse input should exclusively remain with this item.
 
void setKeepMouseGrab (bool)
 Sets whether the mouse input should remain exclusively with this item.
 
bool filtersChildMouseEvents () const
 Returns whether pointer events intended for this item's children should be filtered through this item.
 
void setFiltersChildMouseEvents (bool filter)
 Sets whether pointer events intended for this item's children should be filtered through this item.
 
void grabTouchPoints (const QList< int > &ids)
 
void ungrabTouchPoints ()
 
bool keepTouchGrab () const
 Returns whether the touch points grabbed by this item should exclusively remain with this item.
 
void setKeepTouchGrab (bool)
 Sets whether the touch points grabbed by this item should remain exclusively with this item.
 
 Q_REVISION (2, 4) Q_INVOKABLE bool grabToImage(const QJSValue &callback
 
QSharedPointer< QQuickItemGrabResultgrabToImage (const QSize &targetSize=QSize())
 Grabs the item into an in-memory image.
 
virtual Q_INVOKABLE bool contains (const QPointF &point) const
 \qmlmethod bool QtQuick::Item::contains(point point)
 
QObjectcontainmentMask () const
 
void setContainmentMask (QObject *mask)
 
QTransform itemTransform (QQuickItem *, bool *) const
 \qmlmethod point QtQuick::Item::mapFromItem(Item item, real x, real y) \qmlmethod point QtQuick::Item::mapFromItem(Item item, point p) \qmlmethod rect QtQuick::Item::mapFromItem(Item item, real x, real y, real width, real height) \qmlmethod rect QtQuick::Item::mapFromItem(Item item, rect r)
 
QPointF mapToScene (const QPointF &point) const
 Maps the given point in this item's coordinate system to the equivalent point within the scene's coordinate system, and returns the mapped coordinate.
 
QRectF mapRectToItem (const QQuickItem *item, const QRectF &rect) const
 Maps the given rect in this item's coordinate system to the equivalent rectangular area within item's coordinate system, and returns the mapped rectangle value.
 
QRectF mapRectToScene (const QRectF &rect) const
 Maps the given rect in this item's coordinate system to the equivalent rectangular area within the scene's coordinate system, and returns the mapped rectangle value.
 
QPointF mapFromScene (const QPointF &point) const
 Maps the given point in the scene's coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate.
 
QRectF mapRectFromItem (const QQuickItem *item, const QRectF &rect) const
 Maps the given rect in item's coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value.
 
QRectF mapRectFromScene (const QRectF &rect) const
 Maps the given rect in the scene's coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value.
 
void polish ()
 Schedules a polish event for this item.
 
Q_INVOKABLE QPointF mapFromItem (const QQuickItem *item, const QPointF &point) const
 Maps the given point in item's coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate.
 
Q_INVOKABLE QPointF mapFromItem (const QQuickItem *item, qreal x, qreal y)
 
Q_INVOKABLE QRectF mapFromItem (const QQuickItem *item, const QRectF &rect) const
 
Q_INVOKABLE QRectF mapFromItem (const QQuickItem *item, qreal x, qreal y, qreal width, qreal height) const
 
Q_INVOKABLE QPointF mapToItem (const QQuickItem *item, const QPointF &point) const
 Maps the given point in this item's coordinate system to the equivalent point within item's coordinate system, and returns the mapped coordinate.
 
Q_INVOKABLE QPointF mapToItem (const QQuickItem *item, qreal x, qreal y)
 
Q_INVOKABLE QRectF mapToItem (const QQuickItem *item, const QRectF &rect) const
 
Q_INVOKABLE QRectF mapToItem (const QQuickItem *item, qreal x, qreal y, qreal width, qreal height) const
 
 Q_REVISION (2, 7) Q_INVOKABLE QPointF mapFromGlobal(qreal x
 
 Q_REVISION (2, 7) Q_INVOKABLE QPointF mapFromGlobal(const QPointF &point) const
 
 Q_REVISION (2, 7) Q_INVOKABLE QPointF mapToGlobal(qreal x
 
 Q_REVISION (2, 7) Q_INVOKABLE QPointF mapToGlobal(const QPointF &point) const
 
Q_INVOKABLE void forceActiveFocus ()
 \qmlmethod point QtQuick::Item::mapToItem(Item item, real x, real y) \qmlmethod point QtQuick::Item::mapToItem(Item item, point p) \qmlmethod rect QtQuick::Item::mapToItem(Item item, real x, real y, real width, real height) \qmlmethod rect QtQuick::Item::mapToItem(Item item, rect r)
 
Q_INVOKABLE void forceActiveFocus (Qt::FocusReason reason)
 \qmlmethod QtQuick::Item::forceActiveFocus(Qt::FocusReason reason) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Forces active focus on the item with the given reason.
 
 Q_REVISION (2, 1) Q_INVOKABLE QQuickItem *nextItemInFocusChain(bool forward
 
Q_INVOKABLE QQuickItemchildAt (qreal x, qreal y) const
 \qmlmethod QtQuick::Item::childAt(real x, real y)
 
 Q_REVISION (6, 3) Q_INVOKABLE void ensurePolished()
 
 Q_REVISION (6, 3) Q_INVOKABLE void dumpItemTree() const
 
virtual bool isTextureProvider () const
 Returns true if this item is a texture provider.
 
virtual QSGTextureProvidertextureProvider () const
 Returns the texture provider for an item.
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
void killTimer (Qt::TimerId id)
 
template<typename T >
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 
- Public Member Functions inherited from QQmlParserStatus
 QQmlParserStatus ()
 
virtual ~QQmlParserStatus ()
 

Public Attributes

const QSizetargetSize = QSize())
 
qreal y const
 

Protected Member Functions

bool event (QEvent *) override
 \reimp
 
bool isComponentComplete () const
 Returns true if construction of the QML component is complete; otherwise returns false.
 
virtual void itemChange (ItemChange, const ItemChangeData &)
 Called when change occurs for this item.
 
virtual void geometryChange (const QRectF &newGeometry, const QRectF &oldGeometry)
 
bool widthValid () const
 Returns whether the width property has been set explicitly.
 
bool heightValid () const
 Returns whether the height property has been set explicitly.
 
void setImplicitSize (qreal, qreal)
 
void classBegin () override
 \reimp Derived classes should call the base class method before adding their own action to perform at classBegin.
 
void componentComplete () override
 \reimp Derived classes should call the base class method before adding their own actions to perform at componentComplete.
 
virtual void keyPressEvent (QKeyEvent *event)
 This event handler can be reimplemented in a subclass to receive key press events for an item.
 
virtual void keyReleaseEvent (QKeyEvent *event)
 This event handler can be reimplemented in a subclass to receive key release events for an item.
 
virtual void focusInEvent (QFocusEvent *)
 This event handler can be reimplemented in a subclass to receive focus-in events for an item.
 
virtual void focusOutEvent (QFocusEvent *)
 This event handler can be reimplemented in a subclass to receive focus-out events for an item.
 
virtual void mousePressEvent (QMouseEvent *event)
 This event handler can be reimplemented in a subclass to receive mouse press events for an item.
 
virtual void mouseMoveEvent (QMouseEvent *event)
 This event handler can be reimplemented in a subclass to receive mouse move events for an item.
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 This event handler can be reimplemented in a subclass to receive mouse release events for an item.
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 This event handler can be reimplemented in a subclass to receive mouse double-click events for an item.
 
virtual void mouseUngrabEvent ()
 This event handler can be reimplemented in a subclass to be notified when a mouse ungrab event has occurred on this item.
 
virtual void touchUngrabEvent ()
 This event handler can be reimplemented in a subclass to be notified when a touch ungrab event has occurred on this item.
 
virtual void touchEvent (QTouchEvent *event)
 This event handler can be reimplemented in a subclass to receive touch events for an item.
 
virtual void hoverEnterEvent (QHoverEvent *event)
 This event handler can be reimplemented in a subclass to receive hover-enter events for an item.
 
virtual void hoverMoveEvent (QHoverEvent *event)
 This event handler can be reimplemented in a subclass to receive hover-move events for an item.
 
virtual void hoverLeaveEvent (QHoverEvent *event)
 This event handler can be reimplemented in a subclass to receive hover-leave events for an item.
 
virtual bool childMouseEventFilter (QQuickItem *, QEvent *)
 Reimplement this method to filter the pointer events that are received by this item's children.
 
virtual QSGNodeupdatePaintNode (QSGNode *, UpdatePaintNodeData *)
 Called on the render thread when it is time to sync the state of the item with the scene graph.
 
virtual void releaseResources ()
 This function is called when an item should release graphics resources which are not already managed by the nodes returned from QQuickItem::updatePaintNode().
 
virtual void updatePolish ()
 This function should perform any layout as required for this item.
 
 QQuickItem (QQuickItemPrivate &dd, QQuickItem *parent=nullptr)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 

Properties

QQuickItemparent
 \qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
 
qreal x
 \qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item::width \qmlproperty real QtQuick::Item::height
 
qreal y
 Defines the item's y position relative to its parent.
 
qreal z
 \qmlproperty real QtQuick::Item::z
 
qreal width
 This property holds the width of this item.
 
qreal height
 This property holds the height of this item.
 
qreal opacity
 \qmlproperty real QtQuick::Item::opacity
 
bool enabled
 \qmlproperty bool QtQuick::Item::enabled
 
bool visible
 \qmlproperty bool QtQuick::Item::visible
 
Qt::FocusPolicy focusPolicy
 \qmlproperty enumeration QtQuick::Item::focusPolicy
 
qreal rotation
 \qmlproperty real QtQuick::Item::rotation This property holds the rotation of the item in degrees clockwise around its transformOrigin.
 
qreal scale
 \qmlproperty real QtQuick::Item::scale This property holds the scale factor for this item.
 
TransformOrigin transformOrigin
 \qmlproperty enumeration QtQuick::Item::transformOrigin This property holds the origin point around which scale and rotation transform.
 
QPointF transformOriginPoint
 
QQmlListProperty< QQuickTransformtransform
 \qmlproperty list<Transform> QtQuick::Item::transform This property holds the list of transformations to apply.
 
bool smooth
 \qmlproperty bool QtQuick::Item::smooth
 
bool antialiasing
 \qmlproperty bool QtQuick::Item::antialiasing
 
qreal implicitWidth
 
qreal implicitHeight
 
QObjectcontainmentMask
 \qmlproperty QObject* QtQuick::Item::containmentMask
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Friends

class QQuickDeliveryAgentPrivate
 
class QSGRenderer
 
class QAccessibleQuickItem
 
class QQuickAccessibleAttached
 
class QQuickAnchorChanges
 
Q_QUICK_EXPORT QDebug operator<< (QDebug debug, QQuickItem *item)
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 

Detailed Description

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 instance has no visual appearance, it defines all the attributes that are common across visual items, such as x and y position, width and height, \l {Positioning with Anchors}{anchoring} and key handling support.

You can subclass QQuickItem to provide your own custom visual item that inherits these features.

Definition at line 62 of file qquickitem.h.

Member Enumeration Documentation

◆ Flag

\qmltype Item \instantiates QQuickItem \inherits QtObject \inqmlmodule QtQuick

A basic visual QML type.

The Item type is the base type for all visual items in Qt Quick.

All visual items in Qt Quick inherit from Item. Although an Item object has no visual appearance, it defines all the attributes that are common across visual items, such as x and y position, width and height, \l {Positioning with Anchors}{anchoring} and key handling support.

The Item type can be useful for grouping several items under a single root visual item. For example:

\qml import QtQuick 2.0

Item { Image { source: "tile.png" } Image { x: 80 width: 100 height: 100 source: "tile.png" } Image { x: 190 width: 100 height: 100 fillMode: Image.Tile source: "tile.png" } } \endqml

Enumerator
ItemClipsChildrenToShape 
ItemIsFocusScope 
ItemHasContents 
ItemAcceptsDrops 
ItemIsViewport 
ItemObservesViewport 

Definition at line 129 of file qquickitem.h.

◆ ItemChange

Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.

\value ItemChildAddedChange A child was added. ItemChangeData::item contains the added child.

\value ItemChildRemovedChange A child was removed. ItemChangeData::item contains the removed child.

\value ItemSceneChange The item was added to or removed from a scene. The QQuickWindow rendering the scene is specified in using ItemChangeData::window. The window parameter is null when the item is removed from a scene.

\value ItemVisibleHasChanged The item's visibility has changed. ItemChangeData::boolValue contains the new visibility.

\value ItemParentHasChanged The item's parent has changed. ItemChangeData::item contains the new parent.

\value ItemOpacityHasChanged The item's opacity has changed. ItemChangeData::realValue contains the new opacity.

\value ItemActiveFocusHasChanged The item's focus has changed. ItemChangeData::boolValue contains whether the item has focus or not.

\value ItemRotationHasChanged The item's rotation has changed. ItemChangeData::realValue contains the new rotation.

\value ItemDevicePixelRatioHasChanged The device pixel ratio of the screen the item is on has changed. ItemChangedData::realValue contains the new device pixel ratio.

\value ItemAntialiasingHasChanged The antialiasing has changed. The current (boolean) value can be found in QQuickItem::antialiasing.

\value ItemEnabledHasChanged The item's enabled state has changed. ItemChangeData::boolValue contains the new enabled state. (since Qt 5.10)

Enumerator
ItemChildAddedChange 
ItemChildRemovedChange 
ItemSceneChange 
ItemVisibleHasChanged 
ItemParentHasChanged 
ItemOpacityHasChanged 
ItemActiveFocusHasChanged 
ItemRotationHasChanged 
ItemAntialiasingHasChanged 
ItemDevicePixelRatioHasChanged 
ItemEnabledHasChanged 

Definition at line 144 of file qquickitem.h.

◆ TransformOrigin

\variable QQuickItem::ItemChangeData::realValue The numeric value that has changed: \l {QQuickItem::opacity()}{opacity}, \l {QQuickItem::rotation()}{rotation}, or \l {QScreen::devicePixelRatio}{device pixel ratio}.

See also
QQuickItem::ItemChange

\variable QQuickItem::ItemChangeData::boolValue The boolean value that has changed: \l {QQuickItem::isVisible()}{visible}, \l {QQuickItem::isEnabled()}{enabled}, \l {QQuickItem::hasActiveFocus()}{activeFocus}, or \l {QQuickItem::antialiasing()}{antialiasing}.

See also
QQuickItem::ItemChange

\variable QQuickItem::ItemChangeData::item The item that has been added or removed as a \l{QQuickItem::childItems()}{child}, or the new \l{QQuickItem::parentItem()}{parent}.

See also
QQuickItem::ItemChange

\variable QQuickItem::ItemChangeData::window The \l{QQuickWindow}{window} in which the item has been shown, or nullptr if the item has been removed from a window.

See also
QQuickItem::ItemChange

Controls the point about which simple transforms like scale apply.

\value TopLeft The top-left corner of the item. \value Top The center point of the top of the item. \value TopRight The top-right corner of the item. \value Left The left most point of the vertical middle. \value Center The center of the item. \value Right The right most point of the vertical middle. \value BottomLeft The bottom-left corner of the item. \value Bottom The center point of the bottom of the item. \value BottomRight The bottom-right corner of the item.

See also
transformOrigin(), setTransformOrigin()
Enumerator
TopLeft 
Top 
TopRight 
Left 
Center 
Right 
BottomLeft 
Bottom 
BottomRight 

Definition at line 171 of file qquickitem.h.

Constructor & Destructor Documentation

◆ QQuickItem() [1/2]

QQuickItem::QQuickItem ( QQuickItem * parent = nullptr)
explicit

Constructs a QQuickItem with the given parent.

The parent will be used as both the \l {setParentItem()}{visual parent} and the \l QObject parent.

Definition at line 2353 of file qquickitem.cpp.

References d, and parent.

Referenced by QDeclarativeGeoMapQuickItem::QDeclarativeGeoMapQuickItem().

+ Here is the caller graph for this function:

◆ ~QQuickItem()

◆ QQuickItem() [2/2]

QQuickItem::QQuickItem ( QQuickItemPrivate & dd,
QQuickItem * parent = nullptr )
protected

Definition at line 2362 of file qquickitem.cpp.

References d, and parent.

Member Function Documentation

◆ acceptedMouseButtons()

Qt::MouseButtons QQuickItem::acceptedMouseButtons ( ) const

Returns the mouse buttons accepted by this item.

The default value is Qt::NoButton; that is, no mouse buttons are accepted.

If an item does not accept the mouse button for a particular mouse event, the mouse event will not be delivered to the item and will be delivered to the next item in the item hierarchy instead.

See also
acceptTouchEvents()

Definition at line 8047 of file qquickitem.cpp.

References d.

Referenced by QQuickMouseArea::acceptedButtons(), clickableItemAtPosition(), QQuickFlickable::filterPointerEvent(), QQuickMouseArea::mouseMoveEvent(), QQuickMouseArea::mousePressEvent(), QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl(), and QQuickMouseArea::setAcceptedButtons().

+ Here is the caller graph for this function:

◆ acceptHoverEvents()

bool QQuickItem::acceptHoverEvents ( ) const

Returns whether hover events are accepted by this item.

The default value is false.

If this is false, then the item will not receive any hover events through the hoverEnterEvent(), hoverMoveEvent() and hoverLeaveEvent() functions.

Definition at line 8133 of file qquickitem.cpp.

References d.

◆ acceptTouchEvents()

bool QQuickItem::acceptTouchEvents ( ) const

Returns whether touch events are accepted by this item.

The default value is false.

If this is false, then the item will not receive any touch events through the touchEvent() function.

Since
5.10

Definition at line 8166 of file qquickitem.cpp.

References d.

Referenced by QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl().

+ Here is the caller graph for this function:

◆ activeFocusChanged

void QQuickItem::activeFocusChanged ( bool )
signal

Referenced by QWaylandQuickItem::QWaylandQuickItem(), QWaylandQuickItem::~QWaylandQuickItem(), QQuickStyleItem::connectToControl(), QQuickMenuPrivate::insertItem(), QQuickMenuPrivate::removeItem(), and QQuickFolderBreadcrumbBar::setTextField().

+ Here is the caller graph for this function:

◆ activeFocusOnTab()

bool QQuickItem::activeFocusOnTab ( ) const

\qmlproperty bool QtQuick::Item::activeFocusOnTab

This property holds whether the item wants to be in the tab focus chain. By default, this is set to false.

The tab focus chain traverses elements by first visiting the parent, and then its children in the order they occur in the children property. Pressing the tab key on an item in the tab focus chain will move keyboard focus to the next item in the chain. Pressing BackTab (normally Shift+Tab) will move focus to the previous item.

To set up a manual tab focus chain, see \l KeyNavigation. Tab key events used by Keys or KeyNavigation have precedence over focus chain behavior; ignore the events in other key handlers to allow it to propagate.

This property holds whether the item wants to be in the tab focus chain. By default, this is set to false.

Definition at line 6985 of file qquickitem.cpp.

References d.

Referenced by QQuickTableView::eventFilter(), focusPolicy(), QQuickItemPrivate::nextPrevItemInTabFocusChain(), and setActiveFocusOnTab().

+ Here is the caller graph for this function:

◆ antialiasing()

bool QQuickItem::antialiasing ( ) const

Definition at line 7027 of file qquickitem.cpp.

References d.

◆ antialiasingChanged

void QQuickItem::antialiasingChanged ( bool )
signal

Referenced by resetAntialiasing(), and setAntialiasing().

+ Here is the caller graph for this function:

◆ baselineOffset()

qreal QQuickItem::baselineOffset ( ) const

\qmlproperty int QtQuick::Item::baselineOffset

Specifies the position of the item's baseline in local coordinates.

The baseline of a \l Text item is the imaginary line on which the text sits. Controls containing text usually set their baseline to the baseline of their text.

For non-text items, a default baseline offset of 0 is used.

Specifies the position of the item's baseline in local coordinates.

The baseline of a \l Text item is the imaginary line on which the text sits. Controls containing text usually set their baseline to the baseline of their text.

For non-text items, a default baseline offset of 0 is used.

Definition at line 4557 of file qquickitem.cpp.

References d.

Referenced by QQuickControlPrivate::updateBaselineOffset().

+ Here is the caller graph for this function:

◆ baselineOffsetChanged

void QQuickItem::baselineOffsetChanged ( qreal )
signal

Referenced by QQuickControlPrivate::init(), QQuickLayout::maybeSubscribeToBaseLineOffsetChanges(), setBaselineOffset(), and QQuickControlPrivate::setContentItem_helper().

+ Here is the caller graph for this function:

◆ bindableHeight()

QBindable< qreal > QQuickItem::bindableHeight ( )

Definition at line 7564 of file qquickitem.cpp.

◆ bindableWidth()

QBindable< qreal > QQuickItem::bindableWidth ( )

Definition at line 7355 of file qquickitem.cpp.

◆ bindableX()

QBindable< qreal > QQuickItem::bindableX ( )

Definition at line 7284 of file qquickitem.cpp.

◆ bindableY()

QBindable< qreal > QQuickItem::bindableY ( )

Definition at line 7289 of file qquickitem.cpp.

◆ boundingRect()

QRectF QQuickItem::boundingRect ( ) const
virtual

Returns the extents of the item in its own coordinate system: a rectangle from {0, 0} to \l width() and \l height().

Reimplemented in QQuickImage, QQuickText, QQuickTextEdit, and QQuickTextInput.

Definition at line 5822 of file qquickitem.cpp.

References d.

Referenced by QQuickMaterialRipple::anchorPoint(), QQuickWindowContainer::clipRect(), QQuickPinchArea::event(), QQuickMultiEffectPrivate::itemRect(), QQuickLabsPlatformMenu::open(), QQuickBasicDial::paint(), QQuickUniversalFocusRectangle::paint(), QDeclarativeGeoMap::updatePaintNode(), QQuickStyleItem::updatePaintNode(), QQuickMaterialRipple::updatePaintNode(), QQuickWindowContainer::updatePolish(), and QQuickLayoutItemProxy::updatePos().

+ Here is the caller graph for this function:

◆ childAt()

QQuickItem * QQuickItem::childAt ( qreal x,
qreal y ) const

\qmlmethod QtQuick::Item::childAt(real x, real y)

Returns the first visible child item found at point (x, y) within the coordinate system of this item.

Returns null if there is no such item.

Returns the first visible child item found at point (x, y) within the coordinate system of this item.

Returns \nullptr if there is no such item.

Definition at line 5041 of file qquickitem.cpp.

References QList< T >::at(), child, childItems(), QObject::children(), i, mapToItem(), and QList< T >::size().

Referenced by QQuickMonthGridPrivate::cellAt(), QQuickSplitViewPrivate::handlePress(), QQuickSplitView::hoverMoveEvent(), and QQuickPageIndicatorPrivate::itemAt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ childItems()

QList< QQuickItem * > QQuickItem::childItems ( ) const

Returns the children of this item.

Definition at line 3828 of file qquickitem.cpp.

References d.

Referenced by QQuickContents::~QQuickContents(), QQuickItemGroup::~QQuickItemGroup(), QQuickLayout::~QQuickLayout(), QDeclarativeGeoMapItemBase::afterChildrenChanged(), QDeclarativeGeoMapQuickItem::afterChildrenChanged(), QQuickItemGroup::calculateImplicitSize(), childAt(), QQuickContents::complete(), QQuickBasePositioner::componentComplete(), QDeclarativeGeoMapItemGroup::componentComplete(), QQuickPanePrivate::contentChildItems(), QQuickScrollViewPrivate::contentChildItems(), QQuickMonthGridPrivate::dateOf(), QQuickTumblerPrivate::determineViewType(), QQuickLayout::dumpLayoutTreeRecursive(), QQuickVisualTestUtils::dumpTree(), QQuickAbstractButtonPrivate::findExclusiveButtons(), QQuickVisualTestUtils::findItem(), QQuickVisualTestUtils::findItems(), findSurfaceItemFromMoveItem(), QQuickItemGroup::geometryChange(), QQuickPageIndicatorPrivate::handleRelease(), QQuickStackLayout::indexOf(), QQuickGridLayout::insertLayoutItems(), QQuickLinearLayout::insertLayoutItems(), QQuickPageIndicatorPrivate::itemAt(), QQuickStackLayout::itemAt(), QQuickOverlay::itemChange(), QQuickStackLayout::itemCount(), QQuickMenuPrivate::itemSiblingOrderChanged(), QQuickItemPrivate::nextPrevItemInTabFocusChain(), QQuickBasePositioner::prePositioning(), QQuickDayOfWeekRowPrivate::resizeItems(), QQuickMonthGridPrivate::resizeItems(), QQuickWeekNumberColumnPrivate::resizeItems(), QGfxSourceProxy::updatePolish(), and QQuickTumblerPrivate::viewContentItemChildItems().

+ Here is the caller graph for this function:

◆ childMouseEventFilter()

bool QQuickItem::childMouseEventFilter ( QQuickItem * item,
QEvent * event )
protectedvirtual

Reimplement this method to filter the pointer events that are received by this item's children.

This method will only be called if filtersChildMouseEvents() is true.

Return true if the specified event should not be passed on to the specified child item, and false otherwise. If you return true, you should also \l {QEvent::accept()}{accept} or \l {QEvent::ignore()}{ignore} the event, to signal if event propagation should stop or continue. The event will, however, always be sent to all childMouseEventFilters up the parent chain.

Note
Despite the name, this function filters all QPointerEvent instances during delivery to all children (typically mouse, touch, and tablet events). When overriding this function in a subclass, we suggest writing generic event-handling code using only the accessors found in QPointerEvent. Alternatively you can switch on event->type() and/or event->device()->type() to handle different event types in different ways.
Filtering is just one way to share responsibility in case of gestural ambiguity (for example on press, you don't know whether the user will tap or drag). Another way is to call QPointerEvent::addPassiveGrabber() on press, so as to non-exclusively monitor the progress of the QEventPoint. In either case, the item or pointer handler that is monitoring can steal the exclusive grab later on, when it becomes clear that the gesture fits the pattern that it is expecting.
See also
setFiltersChildMouseEvents()

Reimplemented in QQuickFlickable, QQuickPathView, QQuickStackView, QQuickPopupItem, QQuickSwipeDelegate, QQuickMouseArea, QQuickPinchArea, QQuickOverlay, QQuickScrollView, QQuickSplitView, QWaylandMouseTracker, and QQuickMultiPointTouchArea.

Definition at line 4425 of file qquickitem.cpp.

References item, and Q_UNUSED.

Referenced by QQuickFlickable::childMouseEventFilter(), QQuickPathView::childMouseEventFilter(), QQuickMouseArea::childMouseEventFilter(), QQuickPinchArea::childMouseEventFilter(), QQuickSplitView::childMouseEventFilter(), and QQuickMultiPointTouchArea::childMouseEventFilter().

+ Here is the caller graph for this function:

◆ childrenChanged

void QQuickItem::childrenChanged ( )
signal

◆ childrenRect()

QRectF QQuickItem::childrenRect ( )

\qmlpropertygroup QtQuick::Item::childrenRect \qmlproperty real QtQuick::Item::childrenRect.x \qmlproperty real QtQuick::Item::childrenRect.y \qmlproperty real QtQuick::Item::childrenRect.width \qmlproperty real QtQuick::Item::childrenRect.height \readonly

This read-only property holds the collective position and size of the item's children.

This property is useful if you need to access the collective geometry of an item's children in order to correctly size the item.

The geometry that is returned is local to the item. For example:

Item {
x: 50
y: 100
// prints: QRectF(-10, -20, 30, 40)
Component.onCompleted: print(childrenRect)
Item {
x: -10
y: -20
width: 30
height: 40
}
}

This property holds the collective position and size of the item's children.

This property is useful if you need to access the collective geometry of an item's children in order to correctly size the item.

The geometry that is returned is local to the item. For example:

Item {
x: 50
y: 100
// prints: QRectF(-10, -20, 30, 40)
Component.onCompleted: print(childrenRect)
Item {
x: -10
y: -20
width: 30
height: 40
}
}

Definition at line 3814 of file qquickitem.cpp.

References d.

◆ childrenRectChanged

void QQuickItem::childrenRectChanged ( const QRectF & )
signal

◆ classBegin()

void QQuickItem::classBegin ( )
overrideprotectedvirtual

\reimp Derived classes should call the base class method before adding their own action to perform at classBegin.

Implements QQmlParserStatus.

Reimplemented in QQuickWindowContainer, QQuickShape, QQuickLabel, QQuickRangeSlider, QQuickScrollBar, QQuickSpinBox, QQuickTextArea, and QQuickTextField.

Definition at line 5341 of file qquickitem.cpp.

References d.

Referenced by QQuickShape::classBegin(), QQuickControl::classBegin(), and QDeclarativeGeoMapItemGroup::classBegin().

+ Here is the caller graph for this function:

◆ clip()

bool QQuickItem::clip ( ) const

\qmlproperty bool QtQuick::Item::clip This property holds whether clipping is enabled.

The default clip value is false.

If clipping is enabled, an item will clip its own painting, as well as the painting of its children, to its bounding rectangle.

Note
Clipping can affect rendering performance. See \l {Clipping} for more information.

This property holds whether clipping is enabled. The default clip value is false.

If clipping is enabled, an item will clip its own painting, as well as the painting of its children, to its bounding rectangle. If you set clipping during an item's paint operation, remember to re-set it to prevent clipping the rest of your scene.

Note
Clipping can affect rendering performance. See \l {Clipping} for more information.
For the sake of QML, setting clip to true also sets the \l ItemIsViewport flag, which sometimes acts as an optimization: child items that have the \l ItemObservesViewport flag may forego creating scene graph nodes that fall outside the viewport. But the ItemIsViewport flag can also be set independently.

Definition at line 3862 of file qquickitem.cpp.

References flags(), and ItemClipsChildrenToShape.

Referenced by setClip().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipChanged

void QQuickItem::clipChanged ( bool )
signal

Referenced by setClip().

+ Here is the caller graph for this function:

◆ clipRect()

QRectF QQuickItem::clipRect ( ) const
virtual

Returns the rectangular area within this item that is currently visible in \l viewportItem(), if there is a viewport and the \l ItemObservesViewport flag is set; otherwise, the extents of this item in its own coordinate system: a rectangle from {0, 0} to \l width() and \l height().

This is the region intended to remain visible if \l clip is true. It can also be used in updatePaintNode() to limit the graphics added to the scene graph.

For example, a large drawing or a large text document might be shown in a Flickable that occupies only part of the application's Window: in that case, Flickable is the viewport item, and a custom content-rendering item may choose to omit scene graph nodes that fall outside the area that is currently visible. If the \l ItemObservesViewport flag is set, this area will change each time the user scrolls the content in the Flickable.

In case of nested viewport items, clipRect() is the intersection of the {boundingRect}s of all ancestors that have the \l ItemIsViewport flag set, mapped to the coordinate system of this item.

See also
boundingRect()

Reimplemented in QQuickText, QQuickTextEdit, QQuickTextInput, QQuickWindowContainer, and QQuickClippedText.

Definition at line 5849 of file qquickitem.cpp.

References d, flags(), ItemObservesViewport, mapRectFromItem(), qCDebug, ret, testFlag(), viewport(), and viewportItem().

Referenced by QQuickText::clipRect(), QQuickTextEdit::clipRect(), and QQuickTextInput::clipRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ componentComplete()

void QQuickItem::componentComplete ( )
overrideprotectedvirtual

\reimp Derived classes should call the base class method before adding their own actions to perform at componentComplete.

Implements QQmlParserStatus.

Reimplemented in QQuickMultiEffect, QQuickParticleAffector, QQuickParticleEmitter, QQuickParticlePainter, QQuickParticleSystem, QQuickItemView, QQuickLoader, QQuickPathView, QQuickRepeater, QQuickShaderEffect, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickWindowContainer, QQuickMaterialPlaceholderText, QQuickMaterialTextContainer, QQuickPlaceholderText, QQuickTumblerView, QQuickLayout, QQuickStackLayout, QQuickStyleItem, QQuickShape, QQuickLabel, QQuickMenuItem, QQuickMonthGrid, QQuickPage, QQuickPane, QQuickProgressBar, QQuickRangeSlider, QQuickScrollBar, QQuickScrollView, QQuickSlider, QQuickSpinBox, QQuickSplitView, QQuickStackView, QQuickSwipeDelegate, QQuickSwipeView, QQuickTabBar, QQuickTextArea, QQuickTextField, QQuickTreeViewDelegate, QQuickTumbler, and QQuickWeekNumberColumn.

Definition at line 5360 of file qquickitem.cpp.

References d, QQuickAnchorsPrivate::get(), and QQuickWindowPrivate::get().

Referenced by QQuickMultiEffect::componentComplete(), QQuickParticleAffector::componentComplete(), QQuickParticleEmitter::componentComplete(), QQuickParticlePainter::componentComplete(), QQuickParticleSystem::componentComplete(), QQuickCanvasItem::componentComplete(), QQuickAnimatedImage::componentComplete(), QQuickAnimatedSprite::componentComplete(), QQuickFlickable::componentComplete(), QQuickImageBase::componentComplete(), QQuickLoader::componentComplete(), QQuickPathView::componentComplete(), QQuickBasePositioner::componentComplete(), QQuickRepeater::componentComplete(), QQuickShaderEffect::componentComplete(), QQuickText::componentComplete(), QQuickIconLabel::componentComplete(), QQuickTumblerView::componentComplete(), QQuickLayout::componentComplete(), QQuickStyleItem::componentComplete(), QQuickShape::componentComplete(), QQuickControl::componentComplete(), QDeclarativeGeoMap::componentComplete(), QDeclarativeGeoMapItemGroup::componentComplete(), and QQuick3DViewport::componentComplete().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ containmentMask()

QObject * QQuickItem::containmentMask ( ) const

Definition at line 8713 of file qquickitem.cpp.

References d.

◆ contains()

bool QQuickItem::contains ( const QPointF & point) const
virtual

\qmlmethod bool QtQuick::Item::contains(point point)

Returns true if this item contains point, which is in local coordinates; returns false otherwise. This is the same check that is used for hit-testing a QEventPoint during event delivery, and is affected by \l containmentMask if it is set.

Returns true if this item contains point, which is in local coordinates; returns false otherwise.

This function can be overridden in order to handle point collisions in items with custom shapes. The default implementation checks whether the point is inside \l containmentMask() if it is set, or inside the bounding box otherwise.

Note
This method is used for hit-testing each QEventPoint during event delivery, so the implementation should be kept as lightweight as possible.

Reimplemented in QQuickFlickableContentItem, QQuickShape, QQuickTextArea, QDeclarativeCircleMapItem, QDeclarativePolygonMapItem, QDeclarativePolylineMapItem, and QDeclarativeRectangleMapItem.

Definition at line 8629 of file qquickitem.cpp.

References d, Qt::DirectConnection, Q_ARG, Q_RETURN_ARG, QPointF::x(), and QPointF::y().

Referenced by QQuickPopupPrivate::blockInput(), QQuickDrawerPrivate::blockInput(), QQuickPathView::childMouseEventFilter(), clickableItemAtPosition(), QQuickFlickableContentItem::contains(), QQuickShape::contains(), QQuickTextArea::contains(), QQuickPopupPrivate::contains(), QQuickTrailEmitter::emitWindow(), QQuickFlickable::filterPointerEvent(), QQuickTableViewPrivate::getColumnLayoutWidth(), QQuickTableViewPrivate::getRowLayoutHeight(), QQuickDragHandler::handlePointerEventImpl(), QQuickRangeSliderPrivate::handlePress(), QQuickPopupPrivate::handlePress(), QQuickSelectionRectanglePrivate::handleUnderPos(), isUnderMouse(), QQuickPageIndicatorPrivate::itemAt(), QQuickMouseArea::mouseMoveEvent(), QQuickMouseArea::sendMouseEvent(), QQuickMultiPointTouchArea::sendMouseEvent(), QQuickMultiPointTouchArea::shouldFilter(), and QQuickPopupPrivate::tryClose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enabledChanged

void QQuickItem::enabledChanged ( )
signal

Referenced by QQuickItemParticle::QQuickItemParticle(), QQuickSelectionRectangle::QQuickSelectionRectangle(), QQuick3DItem2D::addChildItem(), QQuickStyleItem::connectToControl(), and QQuickParticleEmitter::setEnabled().

+ Here is the caller graph for this function:

◆ event()

bool QQuickItem::event ( QEvent * ev)
overrideprotectedvirtual

\reimp

Reimplemented from QObject.

Reimplemented in QQuickPinchArea, QQuickRhiItem, QQuickTextEdit, QQuickShaderEffect, QQuickTextInput, QQuickStyleItem, and QQuickMenuBarItem.

Definition at line 9021 of file qquickitem.cpp.

References QEvent::ApplicationPaletteChange, d, QEvent::DragEnter, QEvent::DragLeave, QEvent::DragMove, QEvent::Drop, QObject::event(), QEvent::FocusIn, focusInEvent(), QEvent::FocusOut, focusOutEvent(), QEvent::HoverEnter, hoverEnterEvent(), QEvent::HoverLeave, hoverLeaveEvent(), QEvent::HoverMove, hoverMoveEvent(), i, QEvent::InputMethod, QEvent::InputMethodQuery, isVisible(), item, QEvent::KeyPress, QEvent::KeyRelease, QEvent::LanguageChange, QEvent::LocaleChange, QEvent::MouseButtonDblClick, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, QEvent::MouseMove, mouseMoveEvent(), QEvent::NativeGesture, QInputMethodQueryEvent::queries(), QCoreApplication::sendEvent(), QEvent::ShortcutOverride, QEvent::StyleAnimationUpdate, QEvent::TouchBegin, QEvent::TouchCancel, QEvent::TouchEnd, QEvent::TouchUpdate, update(), QEvent::Wheel, QEvent::WindowActivate, and QEvent::WindowDeactivate.

Referenced by QQuickPinchArea::event(), QQuickRhiItem::event(), QQuick3DViewport::event(), QQuickShaderEffect::event(), QQuickCanvasItem::event(), QQuickFolderBreadcrumbBar::event(), and QQuickStyleItem::event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ filtersChildMouseEvents()

bool QQuickItem::filtersChildMouseEvents ( ) const

Returns whether pointer events intended for this item's children should be filtered through this item.

If both this item and a child item have acceptTouchEvents() true, then when a touch interaction occurs, this item will filter the touch event. But if either this item or the child cannot handle touch events, childMouseEventFilter() will be called with a synthesized mouse event.

See also
setFiltersChildMouseEvents(), childMouseEventFilter()

Definition at line 8085 of file qquickitem.cpp.

References d.

Referenced by QQuickSwipeDelegate::mouseMoveEvent(), and QQuickSwipeDelegate::mouseReleaseEvent().

+ Here is the caller graph for this function:

◆ flags()

QQuickItem::Flags QQuickItem::flags ( ) const

Returns the item flags for this item.

See also
setFlag()

Definition at line 7079 of file qquickitem.cpp.

References d.

Referenced by clip(), clipRect(), QQuickKeysAttached::componentComplete(), findFurthestFocusScopeAncestor(), forceActiveFocus(), isFocusScope(), setFlags(), update(), QQuickText::updatePaintNode(), QQuickTextInput::updatePaintNode(), QQuickTextEdit::updatePaintNode(), and viewportItem().

+ Here is the caller graph for this function:

◆ focusChanged

void QQuickItem::focusChanged ( bool )
signal

Referenced by QQuickStyleItemTextField::connectToControl(), and setFocus().

+ Here is the caller graph for this function:

◆ focusInEvent()

void QQuickItem::focusInEvent ( QFocusEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive focus-in events for an item.

The event information is provided by the event parameter.

\input item.qdocinc accepting-events

If you do reimplement this function, you should call the base class implementation.

Reimplemented in QQuickTextEdit, QQuickTextInput, QQuickComboBox, QQuickControl, QQuickPopupItem, QQuickRangeSlider, QQuickSpinBox, QQuickTextArea, and QQuickTextField.

Definition at line 4153 of file qquickitem.cpp.

References d.

Referenced by event(), QQuickTextEdit::focusInEvent(), QQuickTextInput::focusInEvent(), and QQuickControl::focusInEvent().

+ Here is the caller graph for this function:

◆ focusOutEvent()

void QQuickItem::focusOutEvent ( QFocusEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive focus-out events for an item.

The event information is provided by the event parameter.

\input item.qdocinc accepting-events

Reimplemented in QQuickTextEdit, QQuickTextInput, QQuickAbstractButton, QQuickComboBox, QQuickControl, QQuickPopupItem, QQuickTextArea, and QQuickTextField.

Definition at line 4174 of file qquickitem.cpp.

References d.

Referenced by event(), QQuickTextEdit::focusOutEvent(), QQuickTextInput::focusOutEvent(), and QQuickControl::focusOutEvent().

+ Here is the caller graph for this function:

◆ focusPolicy()

Qt::FocusPolicy QQuickItem::focusPolicy ( ) const

Definition at line 7991 of file qquickitem.cpp.

References activeFocusOnTab(), d, policy, and Qt::TabFocus.

+ Here is the call graph for this function:

◆ forceActiveFocus() [1/2]

void QQuickItem::forceActiveFocus ( )

\qmlmethod point QtQuick::Item::mapToItem(Item item, real x, real y) \qmlmethod point QtQuick::Item::mapToItem(Item item, point p) \qmlmethod rect QtQuick::Item::mapToItem(Item item, real x, real y, real width, real height) \qmlmethod rect QtQuick::Item::mapToItem(Item item, rect r)

Maps the point (x, y) or rect (x, y, width, height), which is in this item's coordinate system, to item's coordinate system, and returns a \l point or \l rect matching the mapped coordinate.

\input item.qdocinc mapping

If item is a null value, this maps the point or rect to the coordinate system of the \l{Scene Coordinates}{scene}.

The versions accepting point and rect are since Qt 5.15.

Since
5.7 \qmlmethod point QtQuick::Item::mapToGlobal(real x, real y)

Maps the point (x, y), which is in this item's coordinate system, to the global coordinate system, and returns a \l point matching the mapped coordinate.

\input item.qdocinc mapping

\qmlmethod QtQuick::Item::forceActiveFocus()

Forces active focus on the item.

This method sets focus on the item and ensures that all ancestor FocusScope objects in the object hierarchy are also given \l focus.

The reason for the focus change will be \l [CPP] Qt::OtherFocusReason. Use the overloaded method to specify the focus reason to enable better handling of the focus change.

See also
activeFocus

Forces active focus on the item.

This method sets focus on the item and ensures that all ancestor FocusScope objects in the object hierarchy are also given \l focus.

The reason for the focus change will be \l [CPP] Qt::OtherFocusReason. Use the overloaded method to specify the focus reason to enable better handling of the focus change.

See also
activeFocus

Definition at line 4960 of file qquickitem.cpp.

References forceActiveFocus(), and Qt::OtherFocusReason.

Referenced by QQuick3DViewport::QQuick3DViewport(), forceActiveFocus(), QQuickFileDialogImplPrivate::handleClick(), QQuickFileDialogImpl::itemChange(), QQuickFolderDialogImpl::itemChange(), QQuickTextEdit::mousePressEvent(), QWaylandQuickItem::takeFocus(), QQuickMenuBarPrivate::toggleCurrentMenu(), and QQuickFolderBreadcrumbBarPrivate::toggleTextFieldVisibility().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forceActiveFocus() [2/2]

void QQuickItem::forceActiveFocus ( Qt::FocusReason reason)

\qmlmethod QtQuick::Item::forceActiveFocus(Qt::FocusReason reason) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Forces active focus on the item with the given reason.

This method sets focus on the item and ensures that all ancestor FocusScope objects in the object hierarchy are also given \l focus.

Since
5.1
See also
activeFocus, Qt::FocusReason

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Forces active focus on the item with the given reason.

This method sets focus on the item and ensures that all ancestor FocusScope objects in the object hierarchy are also given \l focus.

Since
5.1
See also
activeFocus, Qt::FocusReason

Definition at line 4990 of file qquickitem.cpp.

References flags(), ItemIsFocusScope, parent, parentItem(), and setFocus().

+ Here is the call graph for this function:

◆ geometryChange()

void QQuickItem::geometryChange ( const QRectF & newGeometry,
const QRectF & oldGeometry )
protectedvirtual
Since
6.0

This function is called to handle this item's changes in geometry from oldGeometry to newGeometry. If the two geometries are the same, it doesn't do anything.

Derived classes must call the base class method within their implementation.

Reimplemented in QQuickVectorImageGenerator::Utils::ViewBoxItem, QQuickLayoutItemProxy, QQuickMultiEffect, QQuickTurbulenceAffector, QQuickCanvasItem, QQuickFlickable, QQuickFramebufferObject, QQuickGridView, QQuickImage, QQuickItemView, QQuickListView, QQuickLoader, QQuickMouseArea, QQuickPinchArea, QQuickRhiItem, QQuickShaderEffect, QQuickTableView, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickWindowContainer, QQuickIconImage, QQuickIconLabel, QQuickItemGroup, QQuickTumblerView, QQuickLayout, QQuickStyleItem, QQuickControl, QQuickDayOfWeekRow, QQuickDialogButtonBox, QQuickLabel, QQuickMenuBarItem, QQuickMonthGrid, QQuickOverlay, QQuickPopupItem, QQuickRoundButton, QQuickSplitView, QQuickStackView, QQuickSwipeDelegate, QQuickSwipeView, QQuickTabBar, QQuickTextArea, QQuickTextField, QQuickTreeViewDelegate, QQuickTumbler, QQuickWeekNumberColumn, QDeclarativeCircleMapItem, QDeclarativeGeoMap, QDeclarativeGeoMapQuickItem, QDeclarativePolygonMapItem, QDeclarativePolylineMapItem, QDeclarativeRectangleMapItem, QQuickVideoOutput, and QQuick3DViewport.

Definition at line 3890 of file qquickitem.cpp.

References d, QQuickItemPrivate::Geometry, QQuickAnchorsPrivate::get(), QQuickItemPrivate::ChangeListener::gTypes, QRectF::height(), QQuickGeometryChange::heightChange(), QQuickItemChangeListener::itemGeometryChanged(), QQuickItemPrivate::ChangeListener::listener, QQuickGeometryChange::matches(), QQuickGeometryChange::setHeightChange(), QQuickGeometryChange::setWidthChange(), QQuickGeometryChange::setXChange(), QQuickGeometryChange::setYChange(), QRectF::width(), QQuickGeometryChange::widthChange(), QRectF::x(), QQuickGeometryChange::xChange(), QRectF::y(), and QQuickGeometryChange::yChange().

Referenced by QQuickLayoutItemProxy::geometryChange(), QQuickMultiEffect::geometryChange(), QQuickCanvasItem::geometryChange(), QQuickFlickable::geometryChange(), QQuickFramebufferObject::geometryChange(), QQuickImage::geometryChange(), QQuickLoader::geometryChange(), QQuickMouseArea::geometryChange(), QQuickPinchArea::geometryChange(), QQuickRhiItem::geometryChange(), QQuickShaderEffect::geometryChange(), QQuickText::geometryChange(), QQuickTextEdit::geometryChange(), QQuickTextInput::geometryChange(), QQuickWindowContainer::geometryChange(), QQuickIconLabel::geometryChange(), QQuickItemGroup::geometryChange(), QQuickTumblerView::geometryChange(), QQuickLayout::geometryChange(), QQuickStyleItem::geometryChange(), QQuickControl::geometryChange(), QQuickDialogButtonBox::geometryChange(), QQuickMenuBarItem::geometryChange(), QQuickOverlay::geometryChange(), QQuickPopupItem::geometryChange(), QQuickSwipeView::geometryChange(), QQuickTabBar::geometryChange(), QQuickTreeViewDelegate::geometryChange(), QDeclarativeCircleMapItem::geometryChange(), QDeclarativeGeoMap::geometryChange(), QDeclarativeGeoMapQuickItem::geometryChange(), QDeclarativePolygonMapItem::geometryChange(), QDeclarativePolylineMapItem::geometryChange(), QDeclarativeRectangleMapItem::geometryChange(), QQuickVideoOutput::geometryChange(), QQuick3DViewport::geometryChange(), setHeight(), setImplicitHeight(), setImplicitSize(), setImplicitWidth(), setPosition(), setSize(), setWidth(), setX(), and setY().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ grabMouse()

void QQuickItem::grabMouse ( )
Deprecated
Use QPointerEvent::setExclusiveGrabber().

Grabs the mouse input.

This item will receive all mouse events until ungrabMouse() is called. Usually this function should not be called, since accepting for example a mouse press event makes sure that the following events are delivered to the item. If an item wants to take over mouse events from the current receiver, it needs to call this function.

Warning
This function should be used with caution.

Definition at line 8462 of file qquickitem.cpp.

References d, Q_ASSERT, and qWarning.

Referenced by QQuickMultiPointTouchArea::grabGesture(), QQuickDrawerPrivate::grabMouse(), QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), QQuickMouseArea::sendMouseEvent(), and QQuickMultiPointTouchArea::sendMouseEvent().

+ Here is the caller graph for this function:

◆ grabToImage()

bool QQuickItem::grabToImage ( const QSize & targetSize = QSize())

Grabs the item into an in-memory image.

\qmlmethod bool QtQuick::Item::grabToImage(callback, targetSize)

The grab happens asynchronously and the signal QQuickItemGrabResult::ready() is emitted when the grab has been completed.

Use targetSize to specify the size of the target image. By default, the result will have the same size as item.

If the grab could not be initiated, the function returns null.

Note
This function will render the item to an offscreen surface and copy that surface from the GPU's memory into the CPU's memory, which can be quite costly. For "live" preview, use \l {QtQuick::Item::layer.enabled} {layers} or ShaderEffectSource.
See also
QQuickWindow::grabWindow()

Grabs the item into an in-memory image.

The grab happens asynchronously and the JavaScript function callback is invoked when the grab is completed. The callback takes one argument, which is the result of the grab operation; an \l ItemGrabResult object.

Use targetSize to specify the size of the target image. By default, the result will have the same size as the item.

If the grab could not be initiated, the function returns false.

The following snippet shows how to grab an item and store the results in a file:

Rectangle {
id: sourceRectangle
width: 100
height: 100
focus: true
gradient: Gradient {
GradientStop { position: 0; color: "steelblue" }
GradientStop { position: 1; color: "black" }
}
Keys.onSpacePressed: {
sourceRectangle.grabToImage(function(result) {
result.saveToFile("something.png")
})
}
}

The following snippet shows how to grab an item and use the results in another image element:

Image {
id: image
}
Keys.onSpacePressed: {
sourceRectangle.grabToImage(function(result) {
image.source = result.url
}, Qt.size(50, 50))
}
Note
This function will render the item to an offscreen surface and copy that surface from the GPU's memory into the CPU's memory, which can be quite costly. For "live" preview, use \l {QtQuick::Item::layer.enabled} {layers} or ShaderEffectSource.

Only visible from QML.

Definition at line 330 of file qquickitemgrabresult.cpp.

References QQuickWindow::afterRendering(), QQuickWindow::beforeSynchronizing(), QObject::connect(), QQuickItemGrabResultPrivate::create(), Qt::DirectConnection, targetSize, and window().

+ Here is the call graph for this function:

◆ grabTouchPoints()

void QQuickItem::grabTouchPoints ( const QList< int > & ids)
Deprecated
Use QPointerEvent::setExclusiveGrabber(). Grabs the touch points specified by ids.

These touch points will be owned by the item until they are released. Alternatively, the grab can be stolen by a filtering item like Flickable. Use setKeepTouchGrab() to prevent the grab from being stolen.

Definition at line 8549 of file qquickitem.cpp.

References d, Q_UNLIKELY, and qWarning.

◆ hasActiveFocus()

bool QQuickItem::hasActiveFocus ( ) const

Definition at line 7780 of file qquickitem.cpp.

References d.

Referenced by QQuickStyleItem::initStyleOptionBase(), QQuickTextEdit::mousePressEvent(), QQuickPopupPrivate::prepareExitTransition(), QQuickTextEdit::setReadOnly(), QQuickTextInput::setReadOnly(), and QQuickFolderBreadcrumbBarPrivate::textFieldActiveFocusChanged().

+ Here is the caller graph for this function:

◆ hasFocus()

bool QQuickItem::hasFocus ( ) const

Definition at line 7874 of file qquickitem.cpp.

References d.

Referenced by setFocus(), QQuickDeliveryAgentPrivate::setFocusInScope(), and setParentItem().

+ Here is the caller graph for this function:

◆ height()

qreal QQuickItem::height ( ) const

Definition at line 7504 of file qquickitem.cpp.

References d.

◆ heightChanged

◆ heightValid()

bool QQuickItem::heightValid ( ) const
protected

Returns whether the height property has been set explicitly.

Definition at line 7658 of file qquickitem.cpp.

References d.

Referenced by QQuickFlow::doPositioning(), QQuickText::geometryChange(), QQuickTextEdit::geometryChange(), setImplicitHeight(), setImplicitSize(), QQuickText::setMinimumPixelSize(), QQuickText::setMinimumPointSize(), and QQuickImage::updatePaintedGeometry().

+ Here is the caller graph for this function:

◆ hoverEnterEvent()

void QQuickItem::hoverEnterEvent ( QHoverEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive hover-enter events for an item.

The event information is provided by the event parameter.

Hover events are only provided if acceptHoverEvents() is true.

\input item.qdocinc accepting-events

Reimplemented in QQuickMouseArea, QQuickText, QQuickTextEdit, QQuickRangeSlider, QQuickSpinBox, QWaylandMouseTracker, and QWaylandQuickItem.

Definition at line 4292 of file qquickitem.cpp.

Referenced by event(), QQuickMouseArea::hoverEnterEvent(), QQuickRangeSlider::hoverEnterEvent(), and QQuickSpinBox::hoverEnterEvent().

+ Here is the caller graph for this function:

◆ hoverLeaveEvent()

void QQuickItem::hoverLeaveEvent ( QHoverEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive hover-leave events for an item.

The event information is provided by the event parameter.

Hover events are only provided if acceptHoverEvents() is true.

\input item.qdocinc accepting-events

Reimplemented in QQuickMouseArea, QQuickText, QQuickTextEdit, QQuickMenuBar, QQuickRangeSlider, QQuickSpinBox, QQuickSplitView, QWaylandMouseTracker, and QWaylandQuickItem.

Definition at line 4320 of file qquickitem.cpp.

Referenced by event(), QQuickMouseArea::hoverLeaveEvent(), QQuickMenuBar::hoverLeaveEvent(), QQuickRangeSlider::hoverLeaveEvent(), and QQuickSpinBox::hoverLeaveEvent().

+ Here is the caller graph for this function:

◆ hoverMoveEvent()

void QQuickItem::hoverMoveEvent ( QHoverEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive hover-move events for an item.

The event information is provided by the event parameter.

Hover events are only provided if acceptHoverEvents() is true.

\input item.qdocinc accepting-events

Reimplemented in QQuickMouseArea, QQuickText, QQuickTextEdit, QQuickRangeSlider, QQuickSpinBox, QQuickSplitView, QWaylandMouseTracker, and QWaylandQuickItem.

Definition at line 4306 of file qquickitem.cpp.

Referenced by event(), QQuickMouseArea::hoverMoveEvent(), QQuickRangeSlider::hoverMoveEvent(), QQuickSpinBox::hoverMoveEvent(), QQuickSplitView::hoverMoveEvent(), and QWaylandMouseTracker::hoverMoveEvent().

+ Here is the caller graph for this function:

◆ implicitHeight()

qreal QQuickItem::implicitHeight ( ) const

Definition at line 7558 of file qquickitem.cpp.

References d.

◆ implicitHeightChanged

void QQuickItem::implicitHeightChanged ( )
signal

Referenced by QQuickLayoutItemProxy::setTarget().

+ Here is the caller graph for this function:

◆ implicitWidth()

qreal QQuickItem::implicitWidth ( ) const

Returns the width of the item that is implied by other properties that determine the content.

Definition at line 7349 of file qquickitem.cpp.

References d.

◆ implicitWidthChanged

void QQuickItem::implicitWidthChanged ( )
signal

Referenced by QQuickLayoutItemProxy::setTarget().

+ Here is the caller graph for this function:

◆ isAncestorOf()

bool QQuickItem::isAncestorOf ( const QQuickItem * child) const

Returns true if this item is an ancestor of child (i.e., if this item is child's parent, or one of child's parent's ancestors).

Since
5.7
See also
parentItem()

Definition at line 8024 of file qquickitem.cpp.

References child.

Referenced by QQuickPopupPrivate::blockInput(), QQuickDrawerPrivate::blockInput(), QQuickOverlay::eventFilter(), and QQuickDragHandler::onGrabChanged().

+ Here is the caller graph for this function:

◆ isComponentComplete()

bool QQuickItem::isComponentComplete ( ) const
protected

Returns true if construction of the QML component is complete; otherwise returns false.

It is often desirable to delay some processing until the component is completed.

See also
componentComplete()

Definition at line 3237 of file qquickitem.cpp.

References d.

Referenced by QQuickTumbler::contentItemChange(), QQuickItemView::geometryChange(), QQuickIconImage::geometryChange(), QQuickDayOfWeekRow::geometryChange(), QQuickMonthGrid::geometryChange(), QQuickSwipeDelegate::geometryChange(), QQuickWeekNumberColumn::geometryChange(), QQuickShaderEffect::isComponentComplete(), QQuickDialogButtonBox::itemAdded(), QQuickSwipeView::itemAdded(), QQuickTabBar::itemAdded(), QQuickFolderBreadcrumbBar::itemChange(), QQuickContainer::itemChange(), QQuickImageBase::itemChange(), QQuickDialogButtonBox::itemRemoved(), QQuickTabBar::itemRemoved(), QQuickStyleItem::markGeometryDirty(), QQuickStyleItem::markImageDirty(), QQuickDayOfWeekRow::paddingChange(), QQuickMonthGrid::paddingChange(), QQuickWeekNumberColumn::paddingChange(), QQuickComboBox::popup(), QQuickBasePositioner::prePositioning(), QQuickText::resetHAlign(), QQuickTextEdit::resetHAlign(), QQuickTextInput::resetHAlign(), QQuickPathView::resetPathItemCount(), QQuickItemView::resetPreferredHighlightBegin(), QQuickItemView::resetPreferredHighlightEnd(), QQuickDialogButtonBox::setAlignment(), QQuickLoader::setAsynchronous(), QQuickControl::setBackground(), QQuickLabel::setBackground(), QQuickTextArea::setBackground(), QQuickTextField::setBackground(), QQuickDialogButtonBox::setButtonLayout(), QQuickImageBase::setCache(), QQuickItemView::setCacheBuffer(), QQuickText::setColor(), QQuickColorImage::setColor(), QQuickIconImage::setColor(), QQuickImageBase::setCurrentFrame(), QQuickItemView::setCurrentIndex(), QQuickPathView::setCurrentIndex(), QQuickStackLayout::setCurrentIndex(), QQuickTextEdit::setCursorVisible(), QQuickTextInput::setCursorVisible(), QQuickItemView::setDelegate(), QQuickPathView::setDelegate(), QQuickItemView::setDisplayMarginBeginning(), QQuickItemView::setDisplayMarginEnd(), QQuickImage::setFillMode(), QQuickItemView::setFooter(), QQuickPage::setFooter(), QQuickListView::setFooterPositioning(), QQuickSpinBox::setFrom(), QQuickDial::setFrom(), QQuickProgressBar::setFrom(), QQuickRangeSlider::setFrom(), QQuickSlider::setFrom(), QQuickText::setHAlign(), QQuickTextEdit::setHAlign(), QQuickTextInput::setHAlign(), QQuickItemView::setHeader(), QQuickPage::setHeader(), QQuickListView::setHeaderPositioning(), QQuickItemView::setHighlightRangeMode(), QQuickText::setLinkColor(), QQuickScrollBar::setMinimumSize(), QQuickScrollIndicator::setMinimumSize(), QQuickImage::setMipmap(), QQuickImageBase::setMirror(), QQuickImageBase::setMirrorVertically(), QQuickMnemonicLabel::setMnemonicVisible(), QQuickItemView::setModel(), QQuickPathView::setModel(), QQuickRepeater::setModel(), QQuickTumblerView::setModel(), QQuickComboBox::setModel(), QQuickTumbler::setModel(), QQuickIconImage::setName(), QQuickListView::setOrientation(), QQuickScrollBar::setOrientation(), QQuickScrollIndicator::setOrientation(), QQuickSwipeView::setOrientation(), QQuickPathView::setPath(), QQuickPathView::setPathItemCount(), QQuickScrollIndicator::setPosition(), QQuickItemView::setPreferredHighlightBegin(), QQuickItemView::setPreferredHighlightEnd(), QQuickText::setRenderType(), QQuickTextEdit::setRenderType(), QQuickTextInput::setRenderType(), QQuickText::setRenderTypeQuality(), QQuickScrollBar::setSize(), QQuickScrollIndicator::setSize(), QQuickAnimatedImage::setSource(), QQuickImageBase::setSource(), QQuickBorderImage::setSource(), QQuickIconImage::setSource(), QQuickImageBase::setSourceClipRect(), QQuickImageBase::setSourceSize(), QQuickDialogButtonBox::setStandardButtons(), QQuickText::setStyle(), QQuickText::setStyleColor(), QQuickText::setText(), QQuickTextEdit::setText(), QQuickText::setTextFormat(), QQuickTextEdit::setTextFormat(), QQuickComboBox::setTextRole(), QQuickSpinBox::setTo(), QQuickDial::setTo(), QQuickProgressBar::setTo(), QQuickRangeSlider::setTo(), QQuickSlider::setTo(), QQuickText::setVAlign(), QQuickTextInput::setVAlign(), QQuickDial::setValue(), QQuickProgressBar::setValue(), QQuickSlider::setValue(), QQuickComboBox::setValueRole(), QQuickAnimatedSprite::start(), QQuickAnimatedSprite::stop(), and QQuickTextEdit::text().

◆ isEnabled()

◆ isFocusScope()

bool QQuickItem::isFocusScope ( ) const

Returns true if this item is a focus scope, and false otherwise.

Definition at line 7950 of file qquickitem.cpp.

References flags(), and ItemIsFocusScope.

Referenced by QQuickDeliveryAgentPrivate::focusTargetItem(), scopedFocusItem(), setEnabled(), setFocus(), and setParentItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isTextureProvider()

bool QQuickItem::isTextureProvider ( ) const
virtual

Returns true if this item is a texture provider.

The default implementation returns false.

This function can be called from any thread.

Reimplemented in QQuickCanvasItem, QQuickFramebufferObject, QQuickImage, QQuickPaintedItem, QQuickRhiItem, QQuickShaderEffectSource, QQuick3DViewport, and QWaylandQuickItem.

Definition at line 9181 of file qquickitem.cpp.

References d.

Referenced by QWaylandQuickItem::isTextureProvider(), QQuickCanvasItem::textureProvider(), QQuickFramebufferObject::textureProvider(), QQuickImage::textureProvider(), QQuickPaintedItem::textureProvider(), QQuickRhiItem::textureProvider(), QQuick3DViewport::textureProvider(), QWaylandQuickItem::textureProvider(), and QGfxSourceProxy::updatePolish().

+ Here is the caller graph for this function:

◆ isUnderMouse()

bool QQuickItem::isUnderMouse ( ) const

Definition at line 8109 of file qquickitem.cpp.

References contains(), d, QGuiApplicationPrivate::lastCursorPosition, and mapFromScene().

Referenced by QQuickStyleItem::initStyleOptionBase(), and QQuickMouseArea::itemChange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isVisible()

bool QQuickItem::isVisible ( ) const

Definition at line 6516 of file qquickitem.cpp.

References d.

Referenced by QQuickFlickable::childMouseEventFilter(), QQuickPathView::childMouseEventFilter(), QQuickMouseArea::childMouseEventFilter(), QQuickPinchArea::childMouseEventFilter(), QQuickMultiPointTouchArea::childMouseEventFilter(), clickableItemAtPosition(), event(), QQuickPinchArea::event(), QQuickMenuBar::eventFilter(), QQuickOverlay::eventFilter(), QQuickLayoutItemProxy::geometryChange(), QQuickCanvasItem::geometryChange(), QQuickBasicBusyIndicator::isRunning(), QQuickFusionBusyIndicator::isRunning(), QQuickMaterialBusyIndicator::isRunning(), QQuickStackViewAttached::isVisible(), QQuickMouseArea::itemChange(), QQuick3DViewport::itemChange(), QQuickWindowContainer::itemChange(), QQuickPopupPositioner::itemGeometryChanged(), QQuickLayoutItemProxy::maybeTakeControl(), QQuickItemPrivate::nextPrevItemInTabFocusChain(), QQuickFusionDial::paint(), QQuickUniversalFocusRectangle::paint(), QQuickApplicationWindowPrivate::relayout(), QQuickPagePrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickCanvasItem::requestAnimationFrame(), setParentItem(), QQuickPopupPositioner::setParentItem(), QQuickLayoutItemProxy::setTarget(), QQuickFolderBreadcrumbBarPrivate::textFieldActiveFocusChanged(), QQuickFolderBreadcrumbBarPrivate::textFieldVisibleChanged(), QQuickFolderBreadcrumbBarPrivate::toggleTextFieldVisibility(), QQuickPinchArea::touchEvent(), QQuickFileDialogImplPrivate::updateEnabled(), QQuickFolderDialogImplPrivate::updateEnabled(), QQuickBasicProgressBar::updatePaintNode(), QQuickMaterialProgressBar::updatePaintNode(), QQuickUniversalBusyIndicator::updatePaintNode(), QQuickUniversalProgressBar::updatePaintNode(), QQuickCanvasItem::updatePolish(), QQuickWindowContainer::updatePolish(), QQuickStyleItem::updatePolish(), QQuickShape::updatePolish(), QQuickLayoutItemProxy::updatePos(), and QQuick3DTexture::updateSpatialNode().

+ Here is the caller graph for this function:

◆ itemChange()

void QQuickItem::itemChange ( ItemChange change,
const ItemChangeData & value )
protectedvirtual

Called when change occurs for this item.

value contains extra information relating to the change, when applicable.

If you re-implement this method in a subclass, be sure to call

virtual void itemChange(ItemChange, const ItemChangeData &)
Called when change occurs for this item.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]

typically at the end of your implementation, to ensure the \l windowChanged() signal will be emitted.

Reimplemented in QQuickLayoutItemProxy, QQuickVideoOutput, QQuickBasicBusyIndicator, QQuickBasicProgressBar, QQuickFusionBusyIndicator, QQuickMaterialBusyIndicator, QQuickMaterialProgressBar, QQuickMaterialRipple, QQuickUniversalBusyIndicator, QQuickUniversalProgressBar, QQuickItemGroup, QQuickTumblerView, QQuickFolderBreadcrumbBar, QQuickStyleItem, QQuickShape, QQuickContainer, QQuickOverlay, QQuickPopupItem, QQuickMultiEffect, QQuickImageBase, QQuickLoader, QQuickMouseArea, QQuickPinchArea, QQuickRepeater, QQuickShaderEffect, QQuickShaderEffectSource, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickIconImage, QQuickLayout, QQuickStackLayout, QQuickAbstractButton, QQuickComboBox, QQuickControl, QQuickLabel, QQuickSpinBox, QQuickTextArea, QQuickTextField, QQuickParticlePainter, QQuickAnimatedSprite, QQuickPaintedItem, QQuickBasePositioner, QDeclarativeGeoMap, QQuickMenuBar, QQuick3DViewport, QQuickCanvasItem, and QQuickWindowContainer.

Definition at line 5800 of file qquickitem.cpp.

References emit, and ItemSceneChange.

Referenced by QQuickLayoutItemProxy::itemChange(), QQuickBasicBusyIndicator::itemChange(), QQuickBasicProgressBar::itemChange(), QQuickMaterialBusyIndicator::itemChange(), QQuickMaterialProgressBar::itemChange(), QQuickMaterialRipple::itemChange(), QQuickUniversalBusyIndicator::itemChange(), QQuickUniversalProgressBar::itemChange(), QQuickItemGroup::itemChange(), QQuickTumblerView::itemChange(), QQuickStyleItem::itemChange(), QQuickShape::itemChange(), QQuickOverlay::itemChange(), QQuickPopupItem::itemChange(), QQuickMultiEffect::itemChange(), QQuickImageBase::itemChange(), QQuickLoader::itemChange(), QQuickMouseArea::itemChange(), QQuickPinchArea::itemChange(), QQuickRepeater::itemChange(), QQuickShaderEffect::itemChange(), QQuickShaderEffectSource::itemChange(), QQuickText::itemChange(), QQuickTextEdit::itemChange(), QQuickTextInput::itemChange(), QQuickLayout::itemChange(), QQuickControl::itemChange(), QQuickParticlePainter::itemChange(), QQuickAnimatedSprite::itemChange(), QQuickPaintedItem::itemChange(), QQuickBasePositioner::itemChange(), QDeclarativeGeoMap::itemChange(), QQuickCanvasItem::itemChange(), and QQuickWindowContainer::itemChange().

+ Here is the caller graph for this function:

◆ itemTransform()

QTransform QQuickItem::itemTransform ( QQuickItem * other,
bool * ok ) const

\qmlmethod point QtQuick::Item::mapFromItem(Item item, real x, real y) \qmlmethod point QtQuick::Item::mapFromItem(Item item, point p) \qmlmethod rect QtQuick::Item::mapFromItem(Item item, real x, real y, real width, real height) \qmlmethod rect QtQuick::Item::mapFromItem(Item item, rect r)

Maps the point (x, y) or rect (x, y, width, height), which is in item's coordinate system, to this item's coordinate system, and returns a \l point or \l rect matching the mapped coordinate.

\input item.qdocinc mapping

If item is a null value, this maps the point or rect from the coordinate system of the \l{Scene Coordinates}{scene}.

The versions accepting point and rect are since Qt 5.15.

Definition at line 4776 of file qquickitem.cpp.

References d, QQuickItemPrivate::get(), ok, and other().

+ Here is the call graph for this function:

◆ keepMouseGrab()

bool QQuickItem::keepMouseGrab ( ) const

Returns whether mouse input should exclusively remain with this item.

See also
setKeepMouseGrab()

Definition at line 8512 of file qquickitem.cpp.

References d.

Referenced by QQuickDrawerPrivate::blockInput(), QQuickFlickable::filterPointerEvent(), QQuickDrawerPrivate::handleMove(), QQuickDrawerPrivate::handleRelease(), QQuickMouseArea::mouseMoveEvent(), QQuickSwitch::mouseMoveEvent(), QQuickSwitchDelegate::mouseMoveEvent(), QQuickSwitch::nextCheckState(), and QQuickSwitchDelegate::nextCheckState().

+ Here is the caller graph for this function:

◆ keepTouchGrab()

bool QQuickItem::keepTouchGrab ( ) const

Returns whether the touch points grabbed by this item should exclusively remain with this item.

See also
setKeepTouchGrab(), keepMouseGrab()

Definition at line 8581 of file qquickitem.cpp.

References d.

Referenced by QQuickDrawerPrivate::blockInput(), QQuickFlickable::filterPointerEvent(), QQuickDrawerPrivate::handleMove(), QQuickDrawerPrivate::handleRelease(), QQuickSwitch::nextCheckState(), QQuickSwitchDelegate::nextCheckState(), and QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl().

+ Here is the caller graph for this function:

◆ keyPressEvent()

◆ keyReleaseEvent()

void QQuickItem::keyReleaseEvent ( QKeyEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive key release events for an item.

The event information is provided by the event parameter.

\input item.qdocinc accepting-events

Reimplemented in QQuickTextEdit, QQuickFileDialogDelegate, QQuickAbstractButton, QQuickComboBox, QQuickDial, QQuickMenuBar, QQuickMenuBarItem, QQuickPopupItem, QQuickRangeSlider, QQuickSlider, QQuickSpinBox, and QWaylandQuickItem.

Definition at line 4124 of file qquickitem.cpp.

Referenced by QQuickMenuBar::keyPressEvent(), QQuickTextEdit::keyReleaseEvent(), QQuickFileDialogDelegate::keyReleaseEvent(), QQuickAbstractButton::keyReleaseEvent(), QQuickComboBox::keyReleaseEvent(), QQuickDial::keyReleaseEvent(), QQuickMenuBar::keyReleaseEvent(), QQuickMenuBarItem::keyReleaseEvent(), QQuickRangeSlider::keyReleaseEvent(), QQuickSlider::keyReleaseEvent(), and QQuickSpinBox::keyReleaseEvent().

+ Here is the caller graph for this function:

◆ mapFromItem() [1/4]

QPointF QQuickItem::mapFromItem ( const QQuickItem * item,
const QPointF & point ) const

Maps the given point in item's coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate.

\input item.qdocinc mapping

If item is \nullptr, this maps point from the coordinate system of the scene.

See also
{Concepts - Visual Coordinates in Qt Quick}

Definition at line 8872 of file qquickitem.cpp.

References item, mapFromScene(), QGraphicsItem::mapToScene(), QGraphicsItem::window(), and window().

Referenced by QQuickMaterialRipple::anchorPoint(), QQuickParticlePainter::calcSystemOffset(), QQuickSplitView::childMouseEventFilter(), QWaylandMouseTracker::childMouseEventFilter(), QQuickFlickableContentItem::contains(), QQuickTrailEmitter::emitWindow(), QQuickDragHandler::handlePointerEventImpl(), QQuickSelectionRectanglePrivate::handleUnderPos(), QQuickSwitchPrivate::positionAt(), QQuickSwitchDelegatePrivate::positionAt(), and QQuickParticleAffector::updateOffsets().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mapFromItem() [2/4]

QRectF QQuickItem::mapFromItem ( const QQuickItem * item,
const QRectF & rect ) const

Definition at line 10062 of file qquickitem.cpp.

References item, and rect.

◆ mapFromItem() [3/4]

QPointF QQuickItem::mapFromItem ( const QQuickItem * item,
qreal x,
qreal y )

Definition at line 10058 of file qquickitem.cpp.

References item.

◆ mapFromItem() [4/4]

QRectF QQuickItem::mapFromItem ( const QQuickItem * item,
qreal x,
qreal y,
qreal width,
qreal height ) const

Definition at line 10066 of file qquickitem.cpp.

References item.

◆ mapFromScene()

◆ mapRectFromItem()

QRectF QQuickItem::mapRectFromItem ( const QQuickItem * item,
const QRectF & rect ) const

Maps the given rect in item's coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value.

\input item.qdocinc mapping

If item is \nullptr, this maps rect from the coordinate system of the scene.

See also
{Concepts - Visual Coordinates in Qt Quick}

Definition at line 8945 of file qquickitem.cpp.

References d, QQuickItemPrivate::get(), item, and rect.

Referenced by clipRect(), and QQuickWindowContainer::clipRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mapRectFromScene()

QRectF QQuickItem::mapRectFromScene ( const QRectF & rect) const

Maps the given rect in the scene's coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value.

\input item.qdocinc mapping

See also
{Concepts - Visual Coordinates in Qt Quick}

Definition at line 8962 of file qquickitem.cpp.

References d, and rect.

◆ mapRectToItem()

QRectF QQuickItem::mapRectToItem ( const QQuickItem * item,
const QRectF & rect ) const

Maps the given rect in this item's coordinate system to the equivalent rectangular area within item's coordinate system, and returns the mapped rectangle value.

\input item.qdocinc mapping

If item is \nullptr, this maps rect to the coordinate system of the scene.

See also
{Concepts - Visual Coordinates in Qt Quick}

Definition at line 8836 of file qquickitem.cpp.

References d, QQuickItemPrivate::get(), item, and rect.

+ Here is the call graph for this function:

◆ mapRectToScene()

QRectF QQuickItem::mapRectToScene ( const QRectF & rect) const

Maps the given rect in this item's coordinate system to the equivalent rectangular area within the scene's coordinate system, and returns the mapped rectangle value.

\input item.qdocinc mapping

See also
{Concepts - Visual Coordinates in Qt Quick}

Definition at line 8854 of file qquickitem.cpp.

References d, and rect.

Referenced by QQuickLabsPlatformMenu::open().

+ Here is the caller graph for this function:

◆ mapToItem() [1/4]

QPointF QQuickItem::mapToItem ( const QQuickItem * item,
const QPointF & point ) const

Maps the given point in this item's coordinate system to the equivalent point within item's coordinate system, and returns the mapped coordinate.

\input item.qdocinc mapping

If item is \nullptr, this maps point to the coordinate system of the scene.

See also
{Concepts - Visual Coordinates in Qt Quick}

Definition at line 8773 of file qquickitem.cpp.

References item, QGraphicsItem::mapFromScene(), mapToScene(), QGraphicsItem::window(), and window().

Referenced by childAt(), clickableItemAtPosition(), QDeclarativeCircleMapItemPrivateCPU::contains(), QDeclarativePolygonMapItemPrivateCPU::contains(), QDeclarativePolylineMapItemPrivateCPU::contains(), QDeclarativeRectangleMapItemPrivateCPU::contains(), QQuickPinchArea::event(), QQuickPageIndicatorPrivate::itemAt(), QWaylandQuickItem::mouseMoveEvent(), and QQuickPopupPositioner::reposition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mapToItem() [2/4]

QRectF QQuickItem::mapToItem ( const QQuickItem * item,
const QRectF & rect ) const

Definition at line 10074 of file qquickitem.cpp.

References item, and rect.

◆ mapToItem() [3/4]

QPointF QQuickItem::mapToItem ( const QQuickItem * item,
qreal x,
qreal y )

Definition at line 10070 of file qquickitem.cpp.

References item.

◆ mapToItem() [4/4]

QRectF QQuickItem::mapToItem ( const QQuickItem * item,
qreal x,
qreal y,
qreal width,
qreal height ) const

Definition at line 10078 of file qquickitem.cpp.

References item.

◆ mapToScene()

QPointF QQuickItem::mapToScene ( const QPointF & point) const

Maps the given point in this item's coordinate system to the equivalent point within the scene's coordinate system, and returns the mapped coordinate.

\input item.qdocinc mapping

See also
{Concepts - Visual Coordinates in Qt Quick}

Definition at line 8795 of file qquickitem.cpp.

References d.

Referenced by QQuickDragAttachedPrivate::deliverEnterEvent(), QQuickDragAttachedPrivate::deliverMoveEvent(), QQuickMouseArea::geometryChange(), QQuickText::hoveredLink(), QWaylandQuickItem::hoverEnterEvent(), QWaylandQuickItem::hoverMoveEvent(), QQuickDeliveryAgentPrivate::localizePointerEvent(), mapToItem(), QWaylandQuickItem::mouseMoveEvent(), and QWaylandQuickItem::touchEvent().

+ Here is the caller graph for this function:

◆ mouseDoubleClickEvent()

void QQuickItem::mouseDoubleClickEvent ( QMouseEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive mouse double-click events for an item.

The event information is provided by the event parameter.

\input item.qdocinc accepting-events

Reimplemented in QQuickMouseArea, QQuickTextEdit, QQuickTextInput, QQuickAbstractButton, QQuickPopupItem, QQuickTextArea, and QQuickTextField.

Definition at line 4234 of file qquickitem.cpp.

Referenced by QQuickMouseArea::mouseDoubleClickEvent(), QQuickTextEdit::mouseDoubleClickEvent(), and QQuickTextInput::mouseDoubleClickEvent().

+ Here is the caller graph for this function:

◆ mouseMoveEvent()

void QQuickItem::mouseMoveEvent ( QMouseEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive mouse move events for an item.

The event information is provided by the event parameter.

In order to receive mouse movement events, the preceding mouse press event must be accepted (by overriding \l mousePressEvent(), for example) and \l acceptedMouseButtons() must return the relevant mouse button.

\input item.qdocinc accepting-events

Reimplemented in QQuickFlickable, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickPathView, QQuickTextEdit, QQuickTextInput, QQuickControl, QQuickOverlay, QQuickPopupItem, QQuickSwipeDelegate, QQuickSwitch, QQuickSwitchDelegate, QQuickTextArea, QQuickTextField, QWaylandMouseTracker, and QWaylandQuickItem.

Definition at line 4206 of file qquickitem.cpp.

Referenced by event(), QQuickFlickable::mouseMoveEvent(), QQuickMouseArea::mouseMoveEvent(), QQuickMultiPointTouchArea::mouseMoveEvent(), QQuickPathView::mouseMoveEvent(), QQuickTextEdit::mouseMoveEvent(), QQuickTextInput::mouseMoveEvent(), QQuickSwipeDelegate::mouseMoveEvent(), QQuickSwitch::mouseMoveEvent(), QQuickSwitchDelegate::mouseMoveEvent(), and QWaylandMouseTracker::mouseMoveEvent().

+ Here is the caller graph for this function:

◆ mousePressEvent()

void QQuickItem::mousePressEvent ( QMouseEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive mouse press events for an item.

The event information is provided by the event parameter.

In order to receive mouse press events, \l acceptedMouseButtons() must return the relevant mouse button.

\input item.qdocinc accepting-events

Reimplemented in QQuickFlickable, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickPathView, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickAbstractButton, QQuickControl, QQuickDial, QQuickOverlay, QQuickPopupItem, QQuickRangeSlider, QQuickScrollBar, QQuickSlider, QQuickSwipeDelegate, QQuickTextArea, QQuickTextField, QQuickTreeViewDelegate, QDeclarativeGeoMapCopyrightNotice, and QWaylandQuickItem.

Definition at line 4190 of file qquickitem.cpp.

Referenced by QQuickFlickable::mousePressEvent(), QQuickMouseArea::mousePressEvent(), QQuickMultiPointTouchArea::mousePressEvent(), QQuickPathView::mousePressEvent(), QQuickText::mousePressEvent(), QQuickTextEdit::mousePressEvent(), QQuickSwipeDelegate::mousePressEvent(), QQuickTreeViewDelegate::mousePressEvent(), and QDeclarativeGeoMapCopyrightNotice::mousePressEvent().

+ Here is the caller graph for this function:

◆ mouseReleaseEvent()

void QQuickItem::mouseReleaseEvent ( QMouseEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive mouse release events for an item.

The event information is provided by the event parameter.

In order to receive mouse release events, the preceding mouse press event must be accepted (by overriding \l mousePressEvent(), for example) and \l acceptedMouseButtons() must return the relevant mouse button.

\input item.qdocinc accepting-events

Reimplemented in QQuickPathView, QQuickFlickable, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickControl, QQuickOverlay, QQuickPopupItem, QQuickSwipeDelegate, QQuickTextArea, QQuickTextField, QDeclarativeGeoMapCopyrightNotice, and QWaylandQuickItem.

Definition at line 4222 of file qquickitem.cpp.

Referenced by QQuickSwipeDelegate::childMouseEventFilter(), QQuickPathView::mouseReleaseEvent(), QQuickFlickable::mouseReleaseEvent(), QQuickMouseArea::mouseReleaseEvent(), QQuickMultiPointTouchArea::mouseReleaseEvent(), QQuickText::mouseReleaseEvent(), QQuickTextEdit::mouseReleaseEvent(), QQuickTextInput::mouseReleaseEvent(), and QQuickSwipeDelegate::mouseReleaseEvent().

+ Here is the caller graph for this function:

◆ mouseUngrabEvent()

void QQuickItem::mouseUngrabEvent ( )
protectedvirtual

This event handler can be reimplemented in a subclass to be notified when a mouse ungrab event has occurred on this item.

Reimplemented in QQuickFlickable, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickPathView, QQuickTextInput, QQuickControl, QQuickPopupItem, and QQuickSwipeDelegate.

Definition at line 4243 of file qquickitem.cpp.

Referenced by QQuickDeliveryAgentPrivate::onGrabChanged(), and QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl().

+ Here is the caller graph for this function:

◆ opacity()

qreal QQuickItem::opacity ( ) const

Definition at line 6430 of file qquickitem.cpp.

References d.

◆ opacityChanged

void QQuickItem::opacityChanged ( )
signal

Referenced by QDeclarativeGeoMapItemBase::QDeclarativeGeoMapItemBase(), QDeclarativeGeoMapItemGroup::QDeclarativeGeoMapItemGroup(), Vsp2Layer::Vsp2Layer(), and setOpacity().

+ Here is the caller graph for this function:

◆ parentChanged

void QQuickItem::parentChanged ( QQuickItem * )
signal

Referenced by QQuickItemParticle::QQuickItemParticle(), and setParentItem().

+ Here is the caller graph for this function:

◆ parentItem()

QQuickItem * QQuickItem::parentItem ( ) const

Definition at line 2712 of file qquickitem.cpp.

References d.

Referenced by QQuickDialogButtonBoxAttached::QQuickDialogButtonBoxAttached(), QDeclarativeGeoMap::~QDeclarativeGeoMap(), ~QQuickItem(), QQuickOverlay::~QQuickOverlay(), QQuickPopupPositioner::~QQuickPopupPositioner(), QQuickStackElement::~QQuickStackElement(), QQuickTableViewPrivate::~QQuickTableViewPrivate(), QQuickParticlePainter::calcSystemOffset(), QQuickParticleAffector::componentComplete(), QQuickParticleEmitter::componentComplete(), QQuickParticlePainter::componentComplete(), QQuickMaterialTextContainer::componentComplete(), QQuickGridLayoutBase::componentComplete(), QQuickStackLayout::componentComplete(), QQuickDeliveryAgentPrivate::deliverToPassiveGrabbers(), QQuickPopupPrivate::destroyDimmer(), QQuickTextAreaPrivate::detachFlickable(), QQuickItemPrivate::enableSubtreeChangeNotificationsForParentHierachy(), QQuickPinchArea::event(), QQuickOverlay::eventFilter(), findAttachedParent(), forceActiveFocus(), QQuickStackElement::fromObject(), QQuickStackElement::fromStackViewArg(), QQuickDragHandler::handlePointerEventImpl(), QQuickTumblerAttachedPrivate::init(), QQuickScrollBarAttachedPrivate::initHorizontal(), QQuickScrollBarAttachedPrivate::initVertical(), QQuickLayout::invalidate(), QQuickGridLayoutBase::invalidate(), QQuickStackLayout::invalidate(), QQuickTumblerView::itemChange(), QQuickTextArea::itemChange(), QQuickScrollBarAttachedPrivate::layoutHorizontal(), QQuickScrollIndicatorAttachedPrivate::layoutHorizontal(), QQuickScrollBarAttachedPrivate::layoutVertical(), QQuickScrollIndicatorAttachedPrivate::layoutVertical(), QQuickMouseArea::mouseMoveEvent(), QQuickItemPrivate::nextPrevItemInTabFocusChain(), QQuickPopupPositioner::reposition(), QQuickTextAreaPrivate::resizeBackground(), QQuickItemPrivate::resolveLayoutMirror(), QQuickDeliveryAgentPrivate::sendFilteredMouseEvent(), QQuickDeliveryAgentPrivate::sendFilteredPointerEvent(), QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl(), QQuickMenuItem::setArrow(), setEnabled(), setFocus(), QQuickDeliveryAgentPrivate::setFocusInScope(), QQuickScrollBarAttached::setHorizontal(), QQuickScrollIndicatorAttached::setHorizontal(), QQuickAbstractButton::setIndicator(), QQuickComboBox::setIndicator(), QQuickIndicatorButton::setIndicator(), setParentItem(), QQuickPopupPositioner::setParentItem(), QQuickScrollBarAttached::setVertical(), QQuickScrollIndicatorAttached::setVertical(), QQuickTableViewPrivate::updateEditItem(), QQuickSelectionRectanglePrivate::updateSelectionMode(), QQuickItemPrivate::updateSubFocusItem(), and viewportItem().

◆ polish()

void QQuickItem::polish ( )

Schedules a polish event for this item.

When the scene graph processes the request, it will call updatePolish() on this item.

See also
updatePolish(), QQuickTest::qIsPolishScheduled(), ensurePolished()

Definition at line 4613 of file qquickitem.cpp.

References d, and QQuickWindowPrivate::get().

Referenced by QQuickTextEdit::componentComplete(), QQuickStyleItem::componentComplete(), QQuickCanvasItem::event(), QQuickWindowContainer::geometryChange(), QQuickLayout::invalidate(), QQuickDialogButtonBox::itemAdded(), QQuickTabBar::itemAdded(), QQuickWindowContainer::itemChange(), QQuickDialogButtonBox::itemRemoved(), QQuickTabBar::itemRemoved(), QQuickCanvasItem::markDirty(), QQuickStyleItem::markGeometryDirty(), QQuickStyleItem::markImageDirty(), QQuickItemView::modelUpdated(), QDeclarativeGeoMapItemBase::polishAndUpdate(), QQuickPopupPositioner::reposition(), QQuickDialogButtonBox::setAlignment(), QQuickCanvasItem::setCanvasSize(), QQuickCanvasItem::setCanvasWindow(), QQuickTextInput::setColor(), QQuickText::setFontSizeMode(), QGfxSourceProxy::setInput(), QGfxSourceProxy::setInterpolation(), QQuickText::setMinimumPixelSize(), QQuickText::setMinimumPointSize(), QQuickTextInput::setSelectedTextColor(), QQuickTextInput::setSelectionColor(), QGfxSourceProxy::setSourceRect(), QQuickDialogButtonBox::setStandardButtons(), QQuickCanvasItem::setTileSize(), QQuickItemView::trackedPositionChanged(), and QQuickMultiEffectPrivate::updateProxyActiveCheck().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ position()

◆ Q_REVISION() [1/13]

QQuickItem::Q_REVISION ( 2 ,
1  )

◆ Q_REVISION [2/13]

Q_REVISION(6, 7) void focusPolicyChanged(Qt QQuickItem::Q_REVISION ( 2 ,
1  )
signal

◆ Q_REVISION [3/13]

QQuickItem::Q_REVISION ( 2 ,
1  )
signal

◆ Q_REVISION [4/13]

QQuickItem::Q_REVISION ( 2 ,
11  )
signal

◆ Q_REVISION() [5/13]

QQuickItem::Q_REVISION ( 2 ,
4  ) const &

◆ Q_REVISION() [6/13]

QQuickItem::Q_REVISION ( 2 ,
7  ) const &

◆ Q_REVISION() [7/13]

QQuickItem::Q_REVISION ( 2 ,
7  )

◆ Q_REVISION() [8/13]

QQuickItem::Q_REVISION ( 2 ,
7  ) const &

◆ Q_REVISION() [9/13]

QQuickItem::Q_REVISION ( 2 ,
7  )

◆ Q_REVISION [10/13]

QQuickItem::Q_REVISION ( 6 ,
0  )
signal

◆ Q_REVISION [11/13]

QQuickItem::Q_REVISION ( 6 ,
0  )
signal

◆ Q_REVISION() [12/13]

QQuickItem::Q_REVISION ( 6 ,
3  ) const

◆ Q_REVISION() [13/13]

QQuickItem::Q_REVISION ( 6 ,
3  )

◆ releaseResources()

void QQuickItem::releaseResources ( )
protectedvirtual

This function is called when an item should release graphics resources which are not already managed by the nodes returned from QQuickItem::updatePaintNode().

This happens when the item is about to be removed from the window it was previously rendering to. The item is guaranteed to have a \l {QQuickItem::window()}{window} when the function is called.

The function is called on the GUI thread and the state of the rendering thread, when it is used, is unknown. Objects should not be deleted directly, but instead scheduled for cleanup using QQuickWindow::scheduleRenderJob().

See also
{Graphics Resource Handling}

Reimplemented in QQuickCanvasItem, QQuickFramebufferObject, QQuickImage, QQuickPaintedItem, QQuickRhiItem, QQuickShaderEffectSource, QQuickWindowContainer, QQuickVideoOutput, and QQuick3DViewport.

Definition at line 4011 of file qquickitem.cpp.

◆ resetAntialiasing()

void QQuickItem::resetAntialiasing ( )

Definition at line 7053 of file qquickitem.cpp.

References antialiasing, antialiasingChanged(), d, and emit.

+ Here is the call graph for this function:

◆ resetHeight()

void QQuickItem::resetHeight ( )

Definition at line 7535 of file qquickitem.cpp.

References d, implicitHeight, and setImplicitHeight().

Referenced by QQuickStackElement::~QQuickStackElement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetWidth()

void QQuickItem::resetWidth ( )

Definition at line 7327 of file qquickitem.cpp.

References d, implicitWidth, and setImplicitWidth().

Referenced by QQuickStackElement::~QQuickStackElement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rotation()

qreal QQuickItem::rotation ( ) const

Definition at line 6201 of file qquickitem.cpp.

References d.

◆ rotationChanged

void QQuickItem::rotationChanged ( )
signal

Referenced by QmlJSDebugger::Highlight::setItem(), QQuickImageParticle::setRotation(), and setRotation().

+ Here is the caller graph for this function:

◆ scale()

qreal QQuickItem::scale ( ) const

Definition at line 6301 of file qquickitem.cpp.

References d.

◆ scaleChanged

void QQuickItem::scaleChanged ( )
signal

Referenced by setScale().

+ Here is the caller graph for this function:

◆ scopedFocusItem()

QQuickItem * QQuickItem::scopedFocusItem ( ) const

If this item is a focus scope, this returns the item in its focus chain that currently has focus.

Returns \nullptr if this item is not a focus scope.

Definition at line 7961 of file qquickitem.cpp.

References d, and isFocusScope().

Referenced by QQuickDeliveryAgentPrivate::focusTargetItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAcceptedMouseButtons()

void QQuickItem::setAcceptedMouseButtons ( Qt::MouseButtons buttons)

◆ setAcceptHoverEvents()

void QQuickItem::setAcceptHoverEvents ( bool enabled)

If enabled is true, this sets the item to accept hover events; otherwise, hover events are not accepted by this item.

See also
acceptHoverEvents()

Definition at line 8145 of file qquickitem.cpp.

References QQuickItemPrivate::Content, d, and enabled.

Referenced by QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(), QQuickPinchArea::QQuickPinchArea(), QWaylandMouseTracker::QWaylandMouseTracker(), QQuickControl::componentComplete(), QQuickTextArea::componentComplete(), QQuickTextField::componentComplete(), QQuickMouseArea::setEnabled(), QQuickMouseArea::setHoverEnabled(), QQuickText::setText(), and QQuickText::setTextFormat().

+ Here is the caller graph for this function:

◆ setAcceptTouchEvents()

void QQuickItem::setAcceptTouchEvents ( bool enabled)

If enabled is true, this sets the item to accept touch events; otherwise, touch events are not accepted by this item.

Since
5.10
See also
acceptTouchEvents()

Definition at line 8180 of file qquickitem.cpp.

References d, and enabled.

Referenced by QQuickDial::QQuickDial(), QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(), QQuickOverlay::QQuickOverlay(), QQuickPinchArea::QQuickPinchArea(), QQuickPopupItem::QQuickPopupItem(), QQuickRangeSlider::QQuickRangeSlider(), QQuickRectangle::QQuickRectangle(), QQuickScrollBar::QQuickScrollBar(), QQuickSlider::QQuickSlider(), QQuickSwipeDelegate::QQuickSwipeDelegate(), and QQuickPageIndicator::setInteractive().

+ Here is the caller graph for this function:

◆ setActiveFocusOnTab()

void QQuickItem::setActiveFocusOnTab ( bool activeFocusOnTab)

Definition at line 6990 of file qquickitem.cpp.

References activeFocusOnTab(), d, emit, qWarning, and window().

Referenced by QQuickAbstractColorPicker::QQuickAbstractColorPicker(), QQuickDial::QQuickDial(), QQuickMonthGrid::QQuickMonthGrid(), QQuickSlider::QQuickSlider(), QQuickSwipeView::QQuickSwipeView(), QQuickTextArea::QQuickTextArea(), QQuickTextField::QQuickTextField(), QQuickTumbler::QQuickTumbler(), and setFocusPolicy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAntialiasing()

void QQuickItem::setAntialiasing ( bool aa)

Definition at line 7033 of file qquickitem.cpp.

References antialiasing, QQuickItemPrivate::Antialiasing, antialiasingChanged(), d, emit, and ItemAntialiasingHasChanged.

Referenced by QQuickPaintedItem::setAntialiasing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBaselineOffset()

void QQuickItem::setBaselineOffset ( qreal offset)

Definition at line 4563 of file qquickitem.cpp.

References QQuickItemChangeListener::anchorPrivate(), QQuickAnchors::BaselineAnchor, baselineOffsetChanged(), d, emit, QQuickItemPrivate::Geometry, QQuickAnchorsPrivate::get(), QQuickItemPrivate::ChangeListener::listener, and QQuickAnchorsPrivate::updateVerticalAnchors().

Referenced by QQuickControl::setBaselineOffset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setClip()

void QQuickItem::setClip ( bool c)

Definition at line 3867 of file qquickitem.cpp.

References clip(), clipChanged(), emit, QObject::inherits(), ItemClipsChildrenToShape, ItemIsViewport, and setFlag().

Referenced by QQuickScrollViewPrivate::ensureFlickable(), QQuickBasicProgressBar::setIndeterminate(), and QQuickUniversalProgressBar::setIndeterminate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContainmentMask()

void QQuickItem::setContainmentMask ( QObject * mask)

Definition at line 8721 of file qquickitem.cpp.

References d, emit, QQuickItemPrivate::get(), QByteArrayLiteral, qmlWarning(), qobject_cast< QQuickItem * >(), and QStringLiteral.

+ Here is the call graph for this function:

◆ setEnabled()

void QQuickItem::setEnabled ( bool e)

Definition at line 6589 of file qquickitem.cpp.

References d, isFocusScope(), and parentItem().

Referenced by QQuickAbstractButton::setAction(), QWaylandQuickItem::setInputEventsEnabled(), QQuickSpinBoxPrivate::updateDownEnabled(), QQuickFlipablePrivate::updateSide(), and QQuickSpinBoxPrivate::updateUpEnabled().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFiltersChildMouseEvents()

void QQuickItem::setFiltersChildMouseEvents ( bool filter)

Sets whether pointer events intended for this item's children should be filtered through this item.

If filter is true, childMouseEventFilter() will be called when a pointer event is triggered for a child item.

See also
filtersChildMouseEvents()

Definition at line 8100 of file qquickitem.cpp.

References d.

Referenced by QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(), QQuickOverlay::QQuickOverlay(), QQuickScrollView::QQuickScrollView(), QQuickSpinBox::QQuickSpinBox(), QQuickSplitView::QQuickSplitView(), QQuickSplitView::QQuickSplitView(), and QWaylandMouseTracker::QWaylandMouseTracker().

+ Here is the caller graph for this function:

◆ setFlag()

void QQuickItem::setFlag ( Flag flag,
bool enabled = true )

Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disabled.

These provide various hints for the item; for example, the ItemClipsChildrenToShape flag indicates that all children of this item should be clipped to fit within the item area.

Definition at line 7093 of file qquickitem.cpp.

References d, ItemObservesViewport, and setFlags().

Referenced by QDeclarativeCircleMapItem::QDeclarativeCircleMapItem(), QDeclarativeGeoMapQuickItem::QDeclarativeGeoMapQuickItem(), QDeclarativePolygonMapItem::QDeclarativePolygonMapItem(), QDeclarativePolylineMapItem::QDeclarativePolylineMapItem(), QDeclarativeRectangleMapItem::QDeclarativeRectangleMapItem(), QDeclarativeRouteMapItem::QDeclarativeRouteMapItem(), QQuick3DViewport::QQuick3DViewport(), QQuickAnimatedSprite::QQuickAnimatedSprite(), QQuickBasicBusyIndicator::QQuickBasicBusyIndicator(), QQuickBasicProgressBar::QQuickBasicProgressBar(), QQuickCanvasItem::QQuickCanvasItem(), QQuickComboBox::QQuickComboBox(), QQuickFocusScope::QQuickFocusScope(), QQuickFramebufferObject::QQuickFramebufferObject(), QQuickImageBase::QQuickImageBase(), QQuickImageBase::QQuickImageBase(), QQuickImageParticle::QQuickImageParticle(), QQuickItemParticle::QQuickItemParticle(), QQuickLoader::QQuickLoader(), QQuickMaterialBusyIndicator::QQuickMaterialBusyIndicator(), QQuickMaterialProgressBar::QQuickMaterialProgressBar(), QQuickMaterialRipple::QQuickMaterialRipple(), QQuickMenuBar::QQuickMenuBar(), QQuickMonthGrid::QQuickMonthGrid(), QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(), QQuickPaintedItem::QQuickPaintedItem(), QQuickPaintedItem::QQuickPaintedItem(), QQuickPopupItem::QQuickPopupItem(), QQuickRangeSlider::QQuickRangeSlider(), QQuickRectangle::QQuickRectangle(), QQuickRhiItem::QQuickRhiItem(), QQuickRootItem::QQuickRootItem(), QQuickShaderEffect::QQuickShaderEffect(), QQuickShaderEffectSource::QQuickShaderEffectSource(), QQuickShape::QQuickShape(), QQuickSpinBox::QQuickSpinBox(), QQuickSpriteSequence::QQuickSpriteSequence(), QQuickStackView::QQuickStackView(), QQuickStyleItem::QQuickStyleItem(), QQuickSwipeView::QQuickSwipeView(), QQuickTabBar::QQuickTabBar(), QQuickUniversalBusyIndicator::QQuickUniversalBusyIndicator(), QQuickUniversalProgressBar::QQuickUniversalProgressBar(), QQuickVectorImage::QQuickVectorImage(), QQuickVideoOutput::QQuickVideoOutput(), QQuickWindowContainer::QQuickWindowContainer(), QQuickKeysAttached::componentComplete(), setClip(), QQuickTextEdit::setReadOnly(), QQuickTextInput::setReadOnly(), QQuickViewPrivate::setRootObject(), QQuickText::setText(), and QQuickTextEdit::setText().

+ Here is the call graph for this function:

◆ setFlags()

void QQuickItem::setFlags ( Flags flags)

Enables the specified flags for this item.

See also
setFlag()

Definition at line 7126 of file qquickitem.cpp.

References QQuickItemPrivate::Clip, d, flags(), ItemClipsChildrenToShape, ItemIsFocusScope, and qWarning.

Referenced by QDeclarativeGeoMap::QDeclarativeGeoMap(), QQuickDropArea::QQuickDropArea(), and setFlag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFocus() [1/2]

void QQuickItem::setFocus ( bool focus,
Qt::FocusReason reason )

Definition at line 7885 of file qquickitem.cpp.

References d, emit, focus, QQuickItemPrivate::Focus, focusChanged(), QQuickItemPrivate::get(), hasFocus(), isFocusScope(), QQuickItemChangeListener::itemFocusChanged(), QQuickDeliveryAgentPrivate::notifyFocusChangesRecur(), parentItem(), and Q_ASSERT.

+ Here is the call graph for this function:

◆ setFocus() [2/2]

void QQuickItem::setFocus ( bool focus)

Definition at line 7880 of file qquickitem.cpp.

References focus, Qt::OtherFocusReason, and setFocus().

Referenced by QQuickPathViewPrivate::createCurrentItem(), QQuickMenuBar::eventFilter(), forceActiveFocus(), QQuickMenuBar::keyPressEvent(), QQuickPopupPrivate::prepareEnterTransition(), QQuickPopupPrivate::prepareExitTransition(), setFocus(), and QQuickItemViewPrivate::updateCurrent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFocusPolicy()

void QQuickItem::setFocusPolicy ( Qt::FocusPolicy policy)

Sets the focus policy of this item to policy.

See also
focusPolicy()

Definition at line 8005 of file qquickitem.cpp.

References d, emit, policy, setActiveFocusOnTab(), and Qt::TabFocus.

Referenced by QQuickComboBox::QQuickComboBox(), QQuickFileDialogDelegate::QQuickFileDialogDelegate(), QQuickItemDelegate::QQuickItemDelegate(), QQuickItemDelegate::QQuickItemDelegate(), QQuickMenuBar::QQuickMenuBar(), QQuickMenuBarItem::QQuickMenuBarItem(), QQuickRangeSlider::QQuickRangeSlider(), and QQuickSlider::QQuickSlider().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHeight()

void QQuickItem::setHeight ( qreal h)

Definition at line 7510 of file qquickitem.cpp.

References d, geometryChange(), qt_is_nan(), and QQuickItemPrivate::Size.

Referenced by QQuickLoaderPrivate::_q_updateSize(), QQuickStackView::geometryChange(), QQuickStackElement::initialize(), QQuickScrollBarAttachedPrivate::layoutVertical(), QQuickScrollIndicatorAttachedPrivate::layoutVertical(), QDeclarativeGeoMapItemGroup::onMapSizeChanged(), QQuickApplicationWindowPrivate::relayout(), QQuickPagePrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickLabelPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextFieldPrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeContent(), QQuickRootItem::setHeight(), QQuickLoaderPrivate::setInitialState(), QQuickAnchorsPrivate::setItemHeight(), FxListItemSG::setSize(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), and QQuickMultiEffectPrivate::updateSourcePadding().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setImplicitHeight()

void QQuickItem::setImplicitHeight ( qreal h)

Definition at line 7569 of file qquickitem.cpp.

References d, geometryChange(), heightValid(), Q_ASSERT, and QQuickItemPrivate::Size.

Referenced by QQuickItemGenerator::generateRootNode(), QQuickItemGroup::itemImplicitHeightChanged(), resetHeight(), QQuickAnimatedSprite::setFrameHeight(), QQuickVideoOutput::setOrientation(), and QQuickLayoutItemProxy::setTarget().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setImplicitSize()

void QQuickItem::setImplicitSize ( qreal w,
qreal h )
protected

Definition at line 7603 of file qquickitem.cpp.

References d, geometryChange(), height, heightValid(), QQuickItemPrivate::Size, width, and widthValid().

Referenced by QDeclarativeGeoMapCopyrightNotice::copyrightsImageChanged(), QQuickImageBase::loadEmptyUrl(), QQuickImageBase::pixmapChange(), QQuickBasePositioner::prePositioning(), QDeclarativeGeoMapCopyrightNotice::rasterizeHtmlAndUpdate(), QQuickBorderImage::requestFinished(), QQuickItemGroup::updateImplicitSize(), and QQuickImage::updatePaintedGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setImplicitWidth()

void QQuickItem::setImplicitWidth ( qreal w)
\qmlproperty real QtQuick::Item::implicitWidth
\qmlproperty real QtQuick::Item::implicitHeight

Defines the preferred width or height of the Item.

If \l width or \l height is not specified, an item's effective size will be
determined by its \l implicitWidth or \l implicitHeight.

However, if an item is the child of a \l {Qt Quick Layouts}{layout}, the
layout will determine the item's preferred size using its implicit size.
In such a scenario, the explicit \l width or \l height will be ignored.

The default implicit size for most items is 0x0, however some items have an inherent
implicit size which cannot be overridden, for example, \l [QML] Image and \l [QML] Text.

Setting the implicit size is useful for defining components that have a preferred size
based on their content, for example:

\qml

Label.qml import QtQuick 2.0

Item { property alias icon: image.source property alias label: text.text implicitWidth: text.implicitWidth + image.implicitWidth implicitHeight: Math.max(text.implicitHeight, image.implicitHeight) Image { id: image } Text { id: text wrapMode: Text.Wrap anchors.left: image.right; anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter } } \endqml

Note
Using implicitWidth of \l [QML] Text or \l [QML] TextEdit and setting the width explicitly incurs a performance penalty as the text must be laid out twice.
\property QQuickItem::implicitWidth
\property QQuickItem::implicitHeight

Defines the preferred width or height of the Item.

If \l width or \l height is not specified, an item's effective size will be
determined by its \l implicitWidth or \l implicitHeight.

However, if an item is the child of a \l {Qt Quick Layouts}{layout}, the
layout will determine the item's preferred size using its implicit size.
In such a scenario, the explicit \l width or \l height will be ignored.

The default implicit size for most items is 0x0, however some items have an inherent
implicit size which cannot be overridden, for example, \l [QML] Image and \l [QML] Text.

Setting the implicit size is useful for defining components that have a preferred size
based on their content, for example:

\qml

Label.qml import QtQuick 2.0

Item { property alias icon: image.source property alias label: text.text implicitWidth: text.implicitWidth + image.implicitWidth implicitHeight: Math.max(text.implicitHeight, image.implicitHeight) Image { id: image } Text { id: text wrapMode: Text.Wrap anchors.left: image.right; anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter } } \endqml

Note
Using implicitWidth of \l [QML] Text or \l [QML] TextEdit and setting the width explicitly incurs a performance penalty as the text must be laid out twice.

Definition at line 7442 of file qquickitem.cpp.

References d, geometryChange(), Q_ASSERT, QQuickItemPrivate::Size, and widthValid().

Referenced by QQuickItemGenerator::generateRootNode(), QQuickItemGroup::itemImplicitWidthChanged(), resetWidth(), QQuickAnimatedSprite::setFrameWidth(), QQuickVideoOutput::setOrientation(), and QQuickLayoutItemProxy::setTarget().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setKeepMouseGrab()

void QQuickItem::setKeepMouseGrab ( bool keep)

Sets whether the mouse input should remain exclusively with this item.

This is useful for items that wish to grab and keep mouse interaction following a predefined gesture. For example, an item that is interested in horizontal mouse movement may set keepMouseGrab to true once a threshold has been exceeded. Once keepMouseGrab has been set to true, filtering items will not react to mouse events.

If keep is false, a filtering item may steal the grab. For example, \l Flickable may attempt to steal a mouse grab if it detects that the user has begun to move the viewport.

See also
keepMouseGrab()

Definition at line 8534 of file qquickitem.cpp.

References d.

Referenced by QQuickScrollBar::QQuickScrollBar(), QDeclarativeGeoMapCopyrightNotice::copyrightsImageChanged(), QQuickMultiPointTouchArea::grabGesture(), QQuickDrawerPrivate::grabMouse(), QQuickDrawerPrivate::handleRelease(), QQuickMouseArea::mouseMoveEvent(), QQuickTextInput::mouseMoveEvent(), QQuickSwitch::mouseMoveEvent(), QQuickSwitchDelegate::mouseMoveEvent(), QQuickMouseArea::mousePressEvent(), QQuickMultiPointTouchArea::mousePressEvent(), QQuickTextEdit::mousePressEvent(), QQuickTextInput::mousePressEvent(), QQuickDial::mousePressEvent(), QQuickRangeSlider::mousePressEvent(), QQuickSlider::mousePressEvent(), QQuickMouseArea::mouseReleaseEvent(), QQuickMultiPointTouchArea::mouseReleaseEvent(), QQuickTextInput::mouseReleaseEvent(), QQuickPathView::mouseUngrabEvent(), QQuickTextInput::mouseUngrabEvent(), QQuickDragHandler::onActiveChanged(), QDeclarativeGeoMapCopyrightNotice::rasterizeHtmlAndUpdate(), QQuickMultiPointTouchArea::sendMouseEvent(), QQuickMouseArea::setPreventStealing(), QQuickMouseArea::setPropagateComposedEvents(), and QQuickTextEdit::setSelectByMouse().

+ Here is the caller graph for this function:

◆ setKeepTouchGrab()

void QQuickItem::setKeepTouchGrab ( bool keep)

Sets whether the touch points grabbed by this item should remain exclusively with this item.

This is useful for items that wish to grab and keep specific touch points following a predefined gesture. For example, an item that is interested in horizontal touch point movement may set setKeepTouchGrab to true once a threshold has been exceeded. Once setKeepTouchGrab has been set to true, filtering items will not react to the relevant touch points.

If keep is false, a filtering item may steal the grab. For example, \l Flickable may attempt to steal a touch point grab if it detects that the user has begun to move the viewport.

See also
keepTouchGrab(), setKeepMouseGrab()

Definition at line 8604 of file qquickitem.cpp.

References d.

Referenced by QQuickMultiPointTouchArea::grabGesture(), QQuickDrawerPrivate::handleRelease(), and QQuickDragHandler::onActiveChanged().

+ Here is the caller graph for this function:

◆ setOpacity()

void QQuickItem::setOpacity ( qreal newOpacity)

Definition at line 6436 of file qquickitem.cpp.

References d, emit, ItemOpacityHasChanged, o, opacityChanged(), and QQuickItemPrivate::OpacityValue.

Referenced by QQuickPopupPrivate::createOverlay(), QQuickPopupPrivate::finalizeExitTransition(), QQuickItemGenerator::generateNodeBase(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QQuickFlipablePrivate::updateSide(), and QQuickOpacityAnimatorJob::writeBack().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setParentItem()

void QQuickItem::setParentItem ( QQuickItem * parent)

Definition at line 2718 of file qquickitem.cpp.

References d, QQuickDeliveryAgentPrivate::DontChangeFocusProperty, emit, QQuickItemPrivate::get(), QQuickWindowPrivate::get(), hasFocus(), QQuickItemPrivate::inDestructor, isFocusScope(), isVisible(), ItemParentHasChanged, Qt::OtherFocusReason, parentChanged(), QQuickItemPrivate::ParentChanged, parentItem(), Q_UNLIKELY, qWarning, QQuickItemPrivate::removeChild(), and QQuickItemPrivate::subFocusItem.

Referenced by QDeclarativeGeoMapQuickItem::QDeclarativeGeoMapQuickItem(), QOpenXRView::QOpenXRView(), QmlJSDebugger::QQuickWindowInspector::QQuickWindowInspector(), ~QQuickItem(), QQuickItemViewFxItem::~QQuickItemViewFxItem(), QQuickStackElement::~QQuickStackElement(), QQuickTextAreaPrivate::attachFlickable(), QQuickLoaderPrivate::clear(), QQuickPathViewPrivate::createHighlight(), QQuickPopupPrivate::destroyDimmer(), QQuickTextAreaPrivate::detachFlickable(), QQuickPopupPrivate::finalizeExitTransition(), QQuickFlickablePrivate::init(), QQuickMultiEffectPrivate::initialize(), QQuickStackElement::initialize(), QQuickVectorImagePrivate::loadSvg(), QQuickPopupPrivate::prepareEnterTransition(), QQuickMenuItem::setArrow(), QQuickControl::setBackground(), QQuickLabel::setBackground(), QQuickTextArea::setBackground(), QQuickTextField::setBackground(), QOpenXRItemPrivate::setContentItem(), QQuickPage::setFooter(), QQuickAbstractColorPicker::setHandle(), QQuickRangeSliderNode::setHandle(), QQuickSlider::setHandle(), QQuickPage::setHeader(), QQuickScrollBarAttached::setHorizontal(), QQuickScrollIndicatorAttached::setHorizontal(), QQuickAbstractButton::setIndicator(), QQuickComboBox::setIndicator(), QQuickIndicatorButton::setIndicator(), QQuickLoaderPrivate::setInitialState(), QQuickGroupBox::setLabel(), QQuickWidgetPrivate::setRootObject(), QQuick3DTexture::setSourceItem(), QQuickFolderBreadcrumbBar::setTextField(), QQuickFolderBreadcrumbBar::setUpButton(), QQuickScrollBarAttached::setVertical(), QQuickScrollIndicatorAttached::setVertical(), QQuickParticleSystem::stateRedirect(), and QDeclarativeGeoMapQuickItem::updatePolish().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPosition()

◆ setRotation()

void QQuickItem::setRotation ( qreal r)

Definition at line 6207 of file qquickitem.cpp.

References QQuickItemPrivate::BasicTransform, d, emit, ItemRotationHasChanged, and rotationChanged().

Referenced by QQuickRotationAnimatorJob::writeBack().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setScale()

void QQuickItem::setScale ( qreal s)

Definition at line 6307 of file qquickitem.cpp.

References QQuickItemPrivate::BasicTransform, d, emit, and scaleChanged().

Referenced by QQuickPopupPrivate::finalizeExitTransition(), QOpenXRItemPrivate::updateContent(), and QQuickScaleAnimatorJob::writeBack().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSize()

void QQuickItem::setSize ( const QSizeF & size)
Since
5.10

Sets the size of the item to size. This methods preserves any existing binding on width and height; thus any change that triggers the binding to execute again will override the set values.

See also
size, setWidth, setHeight

Definition at line 7689 of file qquickitem.cpp.

References d, geometryChange(), and QQuickItemPrivate::Size.

Referenced by QQuickLoaderPrivate::_q_updateSize(), QQuickWindowPrivate::init(), QQuickMultiEffectPrivate::initialize(), QQuickControlPrivate::resizeBackground(), QQuickControlPrivate::resizeContent(), QQuickFolderBreadcrumbBarPrivate::resizeContent(), QQuickDialogButtonBoxPrivate::resizeContent(), QQuickScrollBarPrivate::resizeContent(), QQuickScrollIndicatorPrivate::resizeContent(), QQuickPopupPrivate::resizeDimmer(), QQuickDrawerPrivate::resizeDimmer(), QQuickItemViewFxItem::setGeometry(), QQuickGridLayoutItem::setGeometry(), QQuickAnchorsPrivate::setItemSize(), QOpenXRItemPrivate::updateContent(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), and QQuickMultiEffectPrivate::updateSourcePadding().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSmooth()

void QQuickItem::setSmooth ( bool smooth)

Definition at line 6948 of file qquickitem.cpp.

References d, emit, smooth, QQuickItemPrivate::Smooth, and smoothChanged().

+ Here is the call graph for this function:

◆ setState()

void QQuickItem::setState ( const QString & state)

Definition at line 5309 of file qquickitem.cpp.

References d, and state().

+ Here is the call graph for this function:

◆ setTransformOrigin()

void QQuickItem::setTransformOrigin ( TransformOrigin origin)

Definition at line 5927 of file qquickitem.cpp.

References d, emit, QQuickItemPrivate::TransformOrigin, and transformOriginChanged().

Referenced by QOpenXRItemPrivate::initParentItem(), and QDeclarativeGeoMapQuickItem::updatePolish().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTransformOriginPoint()

void QQuickItem::setTransformOriginPoint ( const QPointF & point)

Definition at line 5957 of file qquickitem.cpp.

References d, and QQuickItemPrivate::TransformOrigin.

◆ setVisible()

void QQuickItem::setVisible ( bool v)

Definition at line 6536 of file qquickitem.cpp.

References d.

Referenced by QQuickOverlay::QQuickOverlay(), QQuickLoaderPrivate::clear(), QQuickSwipePrivate::createAndShowBehindItem(), QQuickSwipePrivate::createAndShowLeftItem(), QQuickSwipePrivate::createAndShowRightItem(), QmlJSDebugger::InspectTool::enterEvent(), QQuickPopupPrivate::finalizeExitTransition(), QQuickListViewPrivate::getSectionItem(), QmlJSDebugger::InspectTool::hoverMoveEvent(), QQuickFontDialogImpl::init(), QQuickPopupPrivate::init(), QQuickBasicBusyIndicator::itemChange(), QQuickFusionBusyIndicator::itemChange(), QQuickMaterialBusyIndicator::itemChange(), QQuickOverlay::itemChange(), QQuickSplitViewPrivate::itemVisibilityChanged(), QmlJSDebugger::InspectTool::leaveEvent(), QmlJSDebugger::InspectTool::mouseDoubleClickEvent(), QmlJSDebugger::InspectTool::mousePressEvent(), QQuickPopupPrivate::prepareEnterTransition(), QQuickListViewPrivate::releaseItem(), QQuickListViewPrivate::releaseSectionItem(), QQuickStackViewAttached::resetVisible(), QQuickStackLayout::setCurrentIndex(), QQuickColorInputs::setHslAlphaInput(), QQuickColorInputs::setHsvAlphaInput(), QQuickColorDialogImpl::setOptions(), QQuickMessageDialogImpl::setOptions(), QQuickColorInputs::setRgbAlphaInput(), QQuickBasicBusyIndicator::setRunning(), QQuickFusionBusyIndicator::setRunning(), QQuickMaterialBusyIndicator::setRunning(), QQuickLayoutItemProxy::setTarget(), QQuickStackElement::setVisible(), QQuickStackViewAttached::setVisible(), QQuickFolderBreadcrumbBarPrivate::toggleTextFieldVisibility(), QQuickTextEditPrivate::transformChanged(), QQuickSplitViewPrivate::updateHandleVisibilities(), QQuickTreeViewDelegatePrivate::updateIndicatorVisibility(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), and QQuickListViewPrivate::updateStickySections().

+ Here is the caller graph for this function:

◆ setWidth()

void QQuickItem::setWidth ( qreal w)

Definition at line 7305 of file qquickitem.cpp.

References d, geometryChange(), qt_is_nan(), and QQuickItemPrivate::Size.

Referenced by QQuickLoaderPrivate::_q_updateSize(), QQuickStackView::geometryChange(), QQuickStackElement::initialize(), QQuickScrollBarAttachedPrivate::layoutHorizontal(), QQuickScrollIndicatorAttachedPrivate::layoutHorizontal(), QDeclarativeGeoMapItemGroup::onMapSizeChanged(), QQuickApplicationWindowPrivate::relayout(), QQuickPagePrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickLabelPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextFieldPrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeContent(), QQuickLoaderPrivate::setInitialState(), QQuickAnchorsPrivate::setItemWidth(), FxListItemSG::setSize(), QQuickRootItem::setWidth(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), and QQuickMultiEffectPrivate::updateSourcePadding().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setX()

◆ setY()

◆ setZ()

◆ size()

◆ smooth()

bool QQuickItem::smooth ( ) const

Definition at line 6943 of file qquickitem.cpp.

References d.

◆ smoothChanged

void QQuickItem::smoothChanged ( bool )
signal

Referenced by setSmooth().

+ Here is the caller graph for this function:

◆ stackAfter()

void QQuickItem::stackAfter ( const QQuickItem * sibling)

Moves the specified sibling item to the index after this item within the list of children.

The order of children affects both the visual stacking order and tab focus navigation order.

Assuming the z values of both items are the same, this will cause sibling to be rendered below this item.

If both items have activeFocusOnTab set to true, this will also cause the tab focus order to change, with sibling receiving focus before this item.

The given sibling must be a sibling of this item; that is, they must have the same immediate \l parent.

See also
{Concepts - Visual Parent in Qt Quick}

Definition at line 2914 of file qquickitem.cpp.

References QQuickItemPrivate::ChildrenStackingChanged, d, QQuickItemPrivate::get(), Q_ASSERT, qMin(), and qWarning.

Referenced by QQuickScrollView::contentItemChange(), QQuickScrollBarAttachedPrivate::initHorizontal(), QQuickScrollBarAttachedPrivate::initVertical(), and QQuickPopupPrivate::prepareEnterTransition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stackBefore()

void QQuickItem::stackBefore ( const QQuickItem * sibling)

Moves the specified sibling item to the index before this item within the list of children.

The order of children affects both the visual stacking order and tab focus navigation order.

Assuming the z values of both items are the same, this will cause sibling to be rendered above this item.

If both items have activeFocusOnTab set to true, this will also cause the tab focus order to change, with sibling receiving focus after this item.

The given sibling must be a sibling of this item; that is, they must have the same immediate \l parent.

See also
{Concepts - Visual Parent in Qt Quick}

Definition at line 2869 of file qquickitem.cpp.

References QQuickItemPrivate::ChildrenStackingChanged, d, QQuickItemPrivate::get(), Q_ASSERT, qMin(), and qWarning.

+ Here is the call graph for this function:

◆ state()

QString QQuickItem::state ( ) const

\qmlproperty string QtQuick::Item::state

This property holds the name of the current state of the item.

If the item is in its default state, that is, no explicit state has been set, then this property holds an empty string. Likewise, you can return an item to its default state by setting this property to an empty string.

See also
{Qt Quick States}

This property holds the name of the current state of the item.

If the item is in its default state, that is, no explicit state has been set, then this property holds an empty string. Likewise, you can return an item to its default state by setting this property to an empty string.

See also
{Qt Quick States}

Definition at line 5303 of file qquickitem.cpp.

References d.

Referenced by QQuickImageParticle::initialize(), QQuickSplitView::restoreState(), QQuickCheckBox::setCheckState(), and setState().

+ Here is the caller graph for this function:

◆ stateChanged

void QQuickItem::stateChanged ( const QString & state)
signal

◆ textureProvider()

QSGTextureProvider * QQuickItem::textureProvider ( ) const
virtual

Returns the texture provider for an item.

The default implementation returns \nullptr.

This function may only be called on the rendering thread.

Reimplemented in QQuickCanvasItem, QQuickFramebufferObject, QQuickImage, QQuickPaintedItem, QQuickRhiItem, QQuickShaderEffectSource, QQuick3DViewport, and QWaylandQuickItem.

Definition at line 9201 of file qquickitem.cpp.

References d.

Referenced by QQuickCanvasItem::textureProvider(), QQuickFramebufferObject::textureProvider(), QQuickImage::textureProvider(), QQuickPaintedItem::textureProvider(), QQuickRhiItem::textureProvider(), QQuick3DViewport::textureProvider(), QWaylandQuickItem::textureProvider(), and QQuick3DTexture::updateSpatialNode().

+ Here is the caller graph for this function:

◆ touchEvent()

void QQuickItem::touchEvent ( QTouchEvent * event)
protectedvirtual

This event handler can be reimplemented in a subclass to receive touch events for an item.

The event information is provided by the event parameter.

\input item.qdocinc accepting-events

Reimplemented in QQuickMultiPointTouchArea, QQuickFlickable, QQuickPinchArea, QQuickSwipeDelegate, and QWaylandQuickItem.

Definition at line 4278 of file qquickitem.cpp.

Referenced by QQuickMultiPointTouchArea::touchEvent(), QQuickFlickable::touchEvent(), and QQuickPinchArea::touchEvent().

+ Here is the caller graph for this function:

◆ touchUngrabEvent()

void QQuickItem::touchUngrabEvent ( )
protectedvirtual

This event handler can be reimplemented in a subclass to be notified when a touch ungrab event has occurred on this item.

Reimplemented in QQuickMouseArea, QQuickMultiPointTouchArea, and QWaylandQuickItem.

Definition at line 4252 of file qquickitem.cpp.

◆ transform()

QQmlListProperty< QQuickTransform > QQuickItem::transform ( )

◆ transformOrigin()

QQuickItem::TransformOrigin QQuickItem::transformOrigin ( ) const

Definition at line 5921 of file qquickitem.cpp.

References d.

◆ transformOriginChanged

void QQuickItem::transformOriginChanged ( TransformOrigin )
signal

Referenced by QmlJSDebugger::Highlight::setItem(), and setTransformOrigin().

+ Here is the caller graph for this function:

◆ transformOriginPoint()

QPointF QQuickItem::transformOriginPoint ( ) const

Definition at line 5946 of file qquickitem.cpp.

References d.

◆ ungrabMouse()

void QQuickItem::ungrabMouse ( )
Deprecated
Use QPointerEvent::setExclusiveGrabber().

Releases the mouse grab following a call to grabMouse().

Note that this function should only be called when the item wants to stop handling further events. There is no need to call this function after a release or cancel event since no future events will be received in any case. No move or release events will be delivered after this function was called.

Definition at line 8489 of file qquickitem.cpp.

References d, and Q_ASSERT.

Referenced by QQuickPathView::mouseReleaseEvent(), and QQuickMultiPointTouchArea::sendMouseEvent().

+ Here is the caller graph for this function:

◆ ungrabTouchPoints()

void QQuickItem::ungrabTouchPoints ( )
Deprecated
Use QEventPoint::setExclusiveGrabber() instead. Ungrabs the touch points owned by this item.

Definition at line 8567 of file qquickitem.cpp.

References d.

◆ update

void QQuickItem::update ( )
slot

Schedules a call to updatePaintNode() for this item.

The call to QQuickItem::updatePaintNode() will always happen if the item is showing in a QQuickWindow.

Only items which specify QQuickItem::ItemHasContents are allowed to call QQuickItem::update().

Definition at line 4593 of file qquickitem.cpp.

References QQuickItemPrivate::Content, d, flags(), ItemHasContents, metaObject(), and qWarning.

Referenced by QQuick3DViewport::QQuick3DViewport(), QQuickFusionKnob::QQuickFusionKnob(), QQuickRhiItemNode::QQuickRhiItemNode(), QQuickSpriteSequence::QQuickSpriteSequence(), QQuickTextAreaPrivate::attachFlickable(), QDeclarativeGeoMapCopyrightNotice::connectMap(), QDeclarativeGeoMapCopyrightNotice::copyrightsImageChanged(), QQuickTextAreaPrivate::detachFlickable(), QQuickMaterialRipple::enterWave(), event(), QQuickMaterialRipple::exitWave(), QQuickFramebufferObject::geometryChange(), QQuickRhiItem::geometryChange(), QQuickText::geometryChange(), QQuick3DViewport::geometryChange(), QSGFramebufferObjectNode::handleScreenChange(), SGFramebufferObjectNode::handleScreenChange(), QDeclarativeGeoMap::initialize(), QQuickBasicBusyIndicator::itemChange(), QQuickBasicProgressBar::itemChange(), QQuickFusionBusyIndicator::itemChange(), QQuickMaterialBusyIndicator::itemChange(), QQuickMaterialProgressBar::itemChange(), QQuickUniversalBusyIndicator::itemChange(), QQuickUniversalProgressBar::itemChange(), QQuickPaintedItem::itemChange(), QQuick3DViewport::itemChange(), QQuickShaderEffectSource::itemGeometryChanged(), QQuickImageBase::load(), QQuickImageBase::loadEmptyUrl(), QQuickImageBase::loadPixmap(), QDeclarativeGeoMap::onSGNodeChanged(), QQuickBorderImage::pixmapChange(), QQuickImage::pixmapChange(), QDeclarativeGeoMapItemBase::polishAndUpdate(), QDeclarativeGeoMapCopyrightNotice::rasterizeHtmlAndUpdate(), QQuickImageBase::requestFinished(), QQuickImageParticle::reset(), QQuickRectangle::resetBottomLeftRadius(), QQuickRectangle::resetBottomRightRadius(), QQuickRectangle::resetTopLeftRadius(), QQuickRectangle::resetTopRightRadius(), QQuickShaderEffectSource::scheduleUpdate(), QQuickMaterialRipple::setActive(), QQuickRhiItem::setAlphaBlending(), ExampleRhiItem::setAngle(), QQuickRhiItem::setAutoRenderTarget(), QQuickRectangle::setBottomLeftRadius(), QQuickRectangle::setBottomRightRadius(), QQuick3DViewport::setCamera(), QQuickMaterialRipple::setClipRadius(), QQuickRectangle::setColor(), QQuickText::setColor(), QQuickTextInput::setColor(), QQuickBasicDial::setColor(), QQuickBasicProgressBar::setColor(), QQuickFusionBusyIndicator::setColor(), QQuickMaterialBusyIndicator::setColor(), QQuickMaterialProgressBar::setColor(), QQuickMaterialRipple::setColor(), QQuickUniversalBusyIndicator::setColor(), QQuickUniversalProgressBar::setColor(), QDeclarativeGeoMap::setColor(), QQuickRhiItem::setColorBufferFormat(), QQuickPaintedItem::setContentsScale(), QQuickPaintedItem::setContentsSize(), QQuickMaterialTextContainer::setControlHasText(), QDeclarativeGeoMapCopyrightNotice::setCopyrightsZ(), QQuickUniversalBusyIndicator::setCount(), QQuickAnimatedSprite::setCurrentFrame(), QQuickImageBase::setCurrentFrame(), QQuickBasicDial::setEndAngle(), QQuick3DViewport::setEnvironment(), QQuickBasicBusyIndicator::setFill(), QQuickPaintedItem::setFillColor(), QQuickMaterialTextContainer::setFillColor(), QQuickMaterialPlaceholderText::setFilled(), QQuickMaterialTextContainer::setFilled(), QQuickVideoOutput::setFillMode(), QQuickImage::setFillMode(), QQuickRhiItem::setFixedColorBufferHeight(), QQuickRhiItem::setFixedColorBufferWidth(), QQuickMaterialTextContainer::setFocusAnimationProgress(), QQuickMaterialTextContainer::setFocusedOutlineColor(), QQuickShaderEffectSource::setFormat(), QQuickRectangle::setGradient(), QQuickShaderEffectSource::setHideSource(), QQuickFusionDial::setHighlight(), QQuickImage::setHorizontalAlignment(), QQuickMaterialTextContainer::setHorizontalPadding(), QQuickBorderImage::setHorizontalTileMode(), QQuick3DViewport::setImportScene(), QQuickBasicProgressBar::setIndeterminate(), QQuickMaterialProgressBar::setIndeterminate(), QQuickUniversalProgressBar::setIndeterminate(), QQuickText::setLinkColor(), QQuickShaderEffectSource::setLive(), QDeclarativeGeoMapItemBase::setLodThreshold(), QQuickPaintedItem::setMipmap(), QQuickShaderEffectSource::setMipmap(), QQuickImage::setMipmap(), QQuickImageBase::setMirror(), QQuickFramebufferObject::setMirrorVertically(), QQuickRhiItem::setMirrorVertically(), QQuickImageBase::setMirrorVertically(), QQuickPaintedItem::setOpaquePainting(), QQuickVideoOutput::setOrientation(), QQuickMaterialTextContainer::setOutlineColor(), QQuickPaddedRectangle::setPadding(), QWaylandQuickItem::setPaintEnabled(), QQuickBasicBusyIndicator::setPen(), QQuickPaintedItem::setPerformanceHint(), QQuickPaintedItem::setPerformanceHints(), QQuickMaterialTextContainer::setPlaceholderHasText(), QQuickMaterialTextContainer::setPlaceholderTextHAlign(), QQuickMaterialTextContainer::setPlaceholderTextWidth(), QQuickBasicDial::setProgress(), QQuickBasicProgressBar::setProgress(), QQuickMaterialProgressBar::setProgress(), QQuickUniversalProgressBar::setProgress(), QQuickRectangle::setRadius(), QQuickTextInput::setReadOnly(), QQuick3DViewport::setRenderMode(), QQuickPaintedItem::setRenderTarget(), QQuickText::setRenderTypeQuality(), QQuickFusionBusyIndicator::setRunning(), QQuickRhiItem::setSampleCount(), QQuickShaderEffectSource::setSamples(), QQuickTextInput::setSelectedTextColor(), QQuickTextInput::setSelectionColor(), QQuickShaderEffectSource::setSourceItem(), QQuickShaderEffectSource::setSourceRect(), QQuickBasicDial::setStartAngle(), QQuickText::setStyle(), QQuickText::setStyleColor(), QWaylandQuickItem::setSurface(), QQuickShaderEffectSource::setTextureMirroring(), QQuickShaderEffectSource::setTextureSize(), QQuickRectangle::setTopLeftRadius(), QQuickRectangle::setTopRightRadius(), QQuickImage::setVerticalAlignment(), QQuickBorderImage::setVerticalTileMode(), QQuickShaderEffectSource::setWrapMode(), QmlJSDebugger::SelectionHighlight::showName(), QQuickPaintedItem::update(), QQuickImageParticle::updatePaintNode(), QQuickItemParticle::updatePaintNode(), QQuickSpriteSequence::updatePaintNode(), and QQuickCanvasItem::updatePolish().

+ Here is the call graph for this function:

◆ updatePaintNode()

QSGNode * QQuickItem::updatePaintNode ( QSGNode * oldNode,
UpdatePaintNodeData * updatePaintNodeData )
protectedvirtual

Called on the render thread when it is time to sync the state of the item with the scene graph.

The function is called as a result of QQuickItem::update(), if the user has set the QQuickItem::ItemHasContents flag on the item.

The function should return the root of the scene graph subtree for this item. Most implementations will return a single QSGGeometryNode containing the visual representation of this item. oldNode is the node that was returned the last time the function was called. updatePaintNodeData provides a pointer to the QSGTransformNode associated with this QQuickItem.

QSGNode *MyItem::updatePaintNode(QSGNode *node, UpdatePaintNodeData *)
{
QSGSimpleRectNode *n = static_cast<QSGSimpleRectNode *>(node);
if (!n) {
n->setColor(Qt::red);
}
n->setRect(boundingRect());
return n;
}
virtual QRectF boundingRect() const
Returns the extents of the item in its own coordinate system: a rectangle from {0,...
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
The QSGSimpleRectNode class is a convenience class for drawing solid filled rectangles using scenegra...
@ red
Definition qnamespace.h:35
GLfloat n

The main thread is blocked while this function is executed so it is safe to read values from the QQuickItem instance and other objects in the main thread.

If no call to QQuickItem::updatePaintNode() result in actual scene graph changes, like QSGNode::markDirty() or adding and removing nodes, then the underlying implementation may decide to not render the scene again as the visual outcome is identical.

Warning
It is crucial that graphics operations and interaction with the scene graph happens exclusively on the render thread, primarily during the QQuickItem::updatePaintNode() call. The best rule of thumb is to only use classes with the "QSG" prefix inside the QQuickItem::updatePaintNode() function.
This function is called on the render thread. This means any QObjects or thread local storage that is created will have affinity to the render thread, so apply caution when doing anything other than rendering in this function. Similarly for signals, these will be emitted on the render thread and will thus often be delivered via queued connections.
Note
All classes with QSG prefix should be used solely on the scene graph's rendering thread. See \l {Scene Graph and Rendering} for more information.
See also
QSGMaterial, QSGGeometryNode, QSGGeometry, QSGFlatColorMaterial, QSGTextureMaterial, QSGNode::markDirty(), {Graphics Resource Handling}

Reimplemented in QQuickImageParticle, QQuickItemParticle, QQuickCanvasItem, QQuickAnimatedSprite, QQuickBorderImage, QQuickFramebufferObject, QQuickImage, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickPaintedItem, QQuickRectangle, QQuickRhiItem, QQuickShaderEffectSource, QQuickSpriteSequence, QQuickText, QQuickPaddedRectangle, QDeclarativeGeoMap, QDeclarativeGeoMapItemBase, QQuickVideoOutput, QQuick3DViewport, QQuickShape, QQuickStyleItem, QQuickBasicBusyIndicator, QQuickBasicProgressBar, QQuickMaterialBusyIndicator, QQuickMaterialProgressBar, QQuickMaterialRipple, QQuickUniversalBusyIndicator, QQuickUniversalProgressBar, QQuickTextInput, QQuickNinePatchImage, QQuickTextArea, QQuickTextField, QWaylandQuickItem, QQuickShaderEffect, and QQuickTextEdit.

Definition at line 3982 of file qquickitem.cpp.

References Q_UNUSED.

Referenced by QQuickItemParticle::updatePaintNode().

+ Here is the caller graph for this function:

◆ updatePolish()

void QQuickItem::updatePolish ( )
protectedvirtual

This function should perform any layout as required for this item.

When polish() is called, the scene graph schedules a polish event for this item. When the scene graph is ready to render this item, it calls updatePolish() to do any item layout as required before it renders the next frame.

See also
ensurePolished()

Reimplemented in QGfxSourceProxy, QQuickCanvasItem, QQuickFlipable, QQuickItemView, QQuickPathView, QQuickBasePositioner, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickWindowContainer, QQuickLayout, QQuickStyleItem, QQuickShape, QQuickDialogButtonBox, QQuickMonthGrid, QQuickPopupItem, QQuickTabBar, QQuickTumbler, QDeclarativeCircleMapItem, QDeclarativeGeoMapQuickItem, QDeclarativePolygonMapItem, QDeclarativePolylineMapItem, and QDeclarativeRectangleMapItem.

Definition at line 4030 of file qquickitem.cpp.

Referenced by QDeclarativeGeoMapItemBase::setReferenceSurface(), QQuickCanvasItem::updatePolish(), QQuickItemView::updatePolish(), QQuickPathView::updatePolish(), QQuickDialogButtonBox::updatePolish(), QQuickMonthGrid::updatePolish(), and QQuickTabBar::updatePolish().

+ Here is the caller graph for this function:

◆ viewportItem()

QQuickItem * QQuickItem::viewportItem ( ) const

If the \l ItemObservesViewport flag is set, returns the nearest parent with the \l ItemIsViewport flag.

Returns the window's contentItem if the flag is not set, or if no other viewport item is found.

Returns \nullptr only if there is no viewport item and this item is not shown in a window.

See also
clipRect()

Definition at line 5878 of file qquickitem.cpp.

References flags(), ItemIsViewport, ItemObservesViewport, parentItem(), testFlag(), and window().

Referenced by clipRect(), QQuickWindowContainer::clipRect(), and QQuickTextEditPrivate::transformChanged().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visibleChanged

void QQuickItem::visibleChanged ( )
signal

Referenced by QQuickStackViewAttached::QQuickStackViewAttached(), QQuick3DItem2D::addChildItem(), QGeoMapMapboxGLPrivate::addMapItem(), QQuickScrollViewPrivate::disconnectScrollBarSignals(), QQuickScrollViewPrivate::setFlickable(), and QQuickFolderBreadcrumbBar::setTextField().

+ Here is the caller graph for this function:

◆ visibleChildrenChanged

void QQuickItem::visibleChildrenChanged ( )
signal

Referenced by QQuickItemPrivate::setVisible().

+ Here is the caller graph for this function:

◆ width()

qreal QQuickItem::width ( ) const

Definition at line 7299 of file qquickitem.cpp.

References d.

◆ widthChanged

◆ widthValid()

bool QQuickItem::widthValid ( ) const
protected

Returns whether the width property has been set explicitly.

Definition at line 7476 of file qquickitem.cpp.

References d.

Referenced by QQuickRow::doPositioning(), QQuickGrid::doPositioning(), QQuickFlow::doPositioning(), QQuickText::geometryChange(), QQuickTextEdit::geometryChange(), setImplicitSize(), setImplicitWidth(), QQuickText::setMinimumPixelSize(), QQuickText::setMinimumPointSize(), and QQuickImage::updatePaintedGeometry().

+ Here is the caller graph for this function:

◆ window()

QQuickWindow * QQuickItem::window ( ) const

Returns the window in which this item is rendered.

The item does not have a window until it has been assigned into a scene. The \l windowChanged() signal provides a notification both when the item is entered into a scene and when it is removed from a scene.

Definition at line 2953 of file qquickitem.cpp.

References d.

Referenced by QQuickOverlay::QQuickOverlay(), QQuickRhiItemNode::QQuickRhiItemNode(), QQuickScreenAttached::QQuickScreenAttached(), QQuickWindowAttached::QQuickWindowAttached(), Vsp2Layer::Vsp2Layer(), QQuick3DViewport::~QQuick3DViewport(), QQuickCanvasItem::~QQuickCanvasItem(), QQuickImage::~QQuickImage(), QQuickOverlay::~QQuickOverlay(), QQuickPaintedItem::~QQuickPaintedItem(), QQuickShaderEffectSource::~QQuickShaderEffectSource(), QQuick3DLightmapBaker::bake(), QQuickStackView::childMouseEventFilter(), QQuickDeliveryAgentPrivate::clearFocusInScope(), QQuickDeliveryAgentPrivate::clearHover(), QQuickDeliveryAgentPrivate::compressTouchEvent(), QQuickStyleItem::connectToControl(), QQuickItemGrabResultPrivate::create(), QQuick3DViewport::createRenderer(), QQuickDragAttachedPrivate::deliverEnterEvent(), QQuickShapeGenericRenderer::endSync(), QQuickOverlay::eventFilter(), findAttachedParent(), QQuickDeliveryAgentPrivate::flushFrameSynchronousEvents(), grabToImage(), QQuickDeliveryAgentPrivate::handleMouseEvent(), QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), QQuickText::hoveredLink(), QQuickStyleItem::initStyleOptionBase(), QQuick3DTexture::itemChange(), QQuickDragAttachedPrivate::itemParentChanged(), QQuickImageBase::loadPixmap(), mapFromItem(), mapToItem(), QQuickFlickable::mouseReleaseEvent(), QQuickMouseArea::mouseReleaseEvent(), QQuickOverlay::overlay(), QQuickStyleItemScrollBar::paintEvent(), QQuickStyleItemScrollViewCorner::paintEvent(), QQuick3DViewport::pick(), QQuickCanvasItem::releaseResources(), QQuickImage::releaseResources(), QQuickPaintedItem::releaseResources(), QQuickShaderEffectSource::releaseResources(), QQuick3DViewport::releaseResources(), QQuickShapeSoftwareRenderNode::render(), QQuickMouseArea::sendMouseEvent(), QQuickMultiPointTouchArea::sendMouseEvent(), setActiveFocusOnTab(), QQuickContext2DTexture::setCanvasWindow(), QQuickDeliveryAgentPrivate::setFocusInScope(), QQuick3DViewport::setImportScene(), QmlJSDebugger::Highlight::setItem(), QQuickAnimatedSprite::setSource(), QQuickShaderEffectSource::setSourceItem(), QQuickMultiPointTouchArea::shouldFilter(), QQuickMaterialBusyIndicatorNode::sync(), QQuick3DSceneRenderer::synchronize(), QQuickCanvasItem::textureProvider(), QQuickFramebufferObject::textureProvider(), QQuickImage::textureProvider(), QQuickPaintedItem::textureProvider(), QQuick3DViewport::textureProvider(), QQuickCanvasItem::toImage(), QQuickMultiPointTouchArea::touchEvent(), QQuickFlickable::touchEvent(), QQuickShapeGenericRenderer::updateNode(), QQuickCanvasItem::updatePaintNode(), QQuickBorderImage::updatePaintNode(), QQuickFramebufferObject::updatePaintNode(), QQuickImage::updatePaintNode(), QQuickPaintedItem::updatePaintNode(), QQuickRectangle::updatePaintNode(), QQuickRhiItem::updatePaintNode(), QDeclarativeGeoMap::updatePaintNode(), QQuickStyleItem::updatePaintNode(), QQuick3DItem2D::updateSpatialNode(), QQuick3DTexture::updateSpatialNode(), and viewportItem().

◆ x()

qreal QQuickItem::x ( ) const

Definition at line 7171 of file qquickitem.cpp.

References d.

◆ xChanged

void QQuickItem::xChanged ( )
signal

Referenced by QOpenXRView::QOpenXRView(), QmlJSDebugger::Highlight::setItem(), and QDeclarativeGeoMapQuickItem::updatePolish().

+ Here is the caller graph for this function:

◆ y()

qreal QQuickItem::y ( ) const

Definition at line 7177 of file qquickitem.cpp.

References d.

◆ yChanged

void QQuickItem::yChanged ( )
signal

Referenced by QOpenXRView::QOpenXRView(), QmlJSDebugger::Highlight::setItem(), and QDeclarativeGeoMapQuickItem::updatePolish().

+ Here is the caller graph for this function:

◆ z()

qreal QQuickItem::z ( ) const

Definition at line 6121 of file qquickitem.cpp.

References d.

◆ zChanged

void QQuickItem::zChanged ( )
signal

Referenced by setZ().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

Q_QUICK_EXPORT QDebug operator<< ( QDebug debug,
QQuickItem * item )
friend

◆ QAccessibleQuickItem

friend class QAccessibleQuickItem
friend

Definition at line 478 of file qquickitem.h.

◆ QQuickAccessibleAttached

◆ QQuickAnchorChanges

friend class QQuickAnchorChanges
friend

Definition at line 480 of file qquickitem.h.

◆ QQuickDeliveryAgentPrivate

friend class QQuickDeliveryAgentPrivate
friend

Definition at line 476 of file qquickitem.h.

◆ QSGRenderer

friend class QSGRenderer
friend

Definition at line 477 of file qquickitem.h.

Member Data Documentation

◆ const

qreal y QQuickItem::const

Definition at line 347 of file qquickitem.h.

◆ targetSize

const QSize& QQuickItem::targetSize = QSize())

Definition at line 306 of file qquickitem.h.

Referenced by grabToImage().

Property Documentation

◆ antialiasing

QQuickItem::antialiasing
readwrite

\qmlproperty bool QtQuick::Item::antialiasing

Used by visual elements to decide if the item should use antialiasing or not. In some cases items with antialiasing require more memory and are potentially slower to render (see \l {Antialiasing} for more details).

The default is false, but may be overridden by derived elements.

Specifies whether the item is antialiased or not

Used by visual elements to decide if the item should use antialiasing or not. In some cases items with antialiasing require more memory and are potentially slower to render (see \l {Antialiasing} for more details).

The default is false, but may be overridden by derived elements.

Definition at line 113 of file qquickitem.h.

Referenced by QQuickPaintedItem::antialiasing(), QQuickText::itemChange(), resetAntialiasing(), setAntialiasing(), QQuickText::setFont(), QQuickCanvasItem::updatePaintNode(), QQuickRectangle::updatePaintNode(), and QQuickCanvasItem::updatePolish().

◆ containmentMask

QQuickItem::containmentMask
readwrite

\qmlproperty QObject* QtQuick::Item::containmentMask

Since
5.11 This property holds an optional mask for the Item to be used in the \l contains() method. Its main use is currently to determine whether a \l {QPointerEvent}{pointer event} has landed into the item or not.

By default the contains() method will return true for any point within the Item's bounding box. containmentMask allows for more fine-grained control. For example, if a custom C++ QQuickItem subclass with a specialized contains() method is used as containmentMask:

Item { id: item; containmentMask: AnotherItem { id: anotherItem } }
Definition lalr.h:84
QObject * containmentMask
\qmlproperty QObject* QtQuick::Item::containmentMask
Definition qquickitem.h:116
GLenum GLuint id
[7]
QGraphicsItem * item

{item}'s contains method would then return true only if {anotherItem}'s contains() implementation returns true.

A \l Shape can be used as a mask, to make an item react to \l {QPointerEvent}{pointer events} only within a non-rectangular region:

\table \row

  • Rectangle {
    width: 90; height: 100
    color: hoverHandler.hovered ? "wheat" : "lightgray"
    containmentMask: shape
    HoverHandler { id: hoverHandler }
    Shape {
    id: shape
    containsMode: Shape.FillContains
    ShapePath {
    fillColor: "lightsteelblue"
    startX: 10; startY: 20
    PathArc {
    x: 10; y: 80
    radiusX: 40; radiusY: 40
    useLargeArc: true
    }
    PathLine {
    x: 10; y: 20
    }
    }
    }
    }
    \endtable

It is also possible to define the contains method in QML. For example, to create a circular item that only responds to events within its actual bounds:

\table \row

  • Rectangle {
    id: circle
    width: 100; height: width
    radius: width / 2
    color: tapHandler.pressed ? "tomato" : hoverHandler.hovered ? "darkgray" : "lightgray"
    TapHandler { id: tapHandler }
    HoverHandler { id: hoverHandler }
    containmentMask: QtObject {
    property alias radius: circle.radius
    function contains(point: point) : bool {
    return (Math.pow(point.x - radius, 2) + Math.pow(point.y - radius, 2)) < Math.pow(radius, 2)
    }
    }
    }
    \endtable
See also
{Qt Quick Examples - Shapes}
Since
5.11 This property holds an optional mask to be used in the contains() method, which is mainly used for hit-testing each \l QPointerEvent.

By default, \l contains() will return true for any point within the Item's bounding box. But any QQuickItem, or any QObject that implements a function of the form

Q_INVOKABLE bool contains(const QPointF &point) const;
\inmodule QtCore\reentrant
Definition qpoint.h:214
virtual Q_INVOKABLE bool contains(const QPointF &point) const
\qmlmethod bool QtQuick::Item::contains(point point)
#define Q_INVOKABLE

can be used as a mask, to defer hit-testing to that object.

Note
contains() is called frequently during event delivery. Deferring hit-testing to another object slows it down somewhat. containmentMask() can cause performance problems if that object's contains() method is not efficient. If you implement a custom QQuickItem subclass, you can alternatively override contains().
See also
contains()

Definition at line 116 of file qquickitem.h.

◆ enabled

QQuickItem::enabled
readwrite

\qmlproperty bool QtQuick::Item::enabled

This property holds whether the item receives mouse and keyboard events. By default this is true.

Setting this property directly affects the enabled value of child items. When set to false, the enabled values of all child items also become false. When set to true, the enabled values of child items are returned to true, unless they have explicitly been set to false.

Setting this property to false automatically causes \l activeFocus to be set to false, and this item will no longer receive keyboard events.

See also
visible

This property holds whether the item receives mouse and keyboard events. By default this is true.

Setting this property directly affects the enabled value of child items. When set to false, the enabled values of all child items also become false. When set to true, the enabled values of child items are returned to true, unless they have explicitly been set to false.

Setting this property to false automatically causes \l activeFocus to be set to false, and this item will longer receive keyboard events.

Note
Hover events are enabled separately by \l setAcceptHoverEvents(). Thus, a disabled item can continue to receive hover events, even when this property is false. This makes it possible to show informational feedback (such as \l ToolTip) even when an interactive item is disabled. The same is also true for any \l {HoverHandler}{HoverHandlers} added as children of the item. A HoverHandler can, however, be \l {PointerHandler::enabled}{disabled} explicitly, or for example be bound to the enabled state of the item.
See also
visible

Definition at line 79 of file qquickitem.h.

Referenced by setAcceptHoverEvents(), setAcceptTouchEvents(), QWaylandQuickShellSurfaceItem::setAutoCreatePopupItems(), QQuickRhiItem::setAutoRenderTarget(), QQuickTableView::setKeyNavigationEnabled(), QQuickShaderEffectSource::setMipmap(), QWaylandQuickItem::setPaintEnabled(), QQuickTableView::setPointerNavigationEnabled(), QQuickShaderEffectSource::setRecursive(), QQuickTableView::setResizableColumns(), QQuickTableView::setResizableRows(), QWaylandQuickItem::setTouchEventsEnabled(), and QQuickControl::setWheelEnabled().

◆ focusPolicy

QQuickItem::focusPolicy
readwrite

\qmlproperty enumeration QtQuick::Item::focusPolicy

Since
6.7

This property determines the way the item accepts focus.

\value Qt.TabFocus The item accepts focus by tabbing. \value Qt.ClickFocus The item accepts focus by clicking. \value Qt.StrongFocus The item accepts focus by both tabbing and clicking. \value Qt.WheelFocus The item accepts focus by tabbing, clicking, and using the mouse wheel. \value Qt.NoFocus The item does not accept focus.

Note
This property was a member of the \l[QML]{Control} QML type in Qt 6.6 and earlier.
Since
6.7

This property determines the way the item accepts focus.

Definition at line 104 of file qquickitem.h.

◆ height

QQuickItem::height
readwrite

This property holds the height of this item.

Definition at line 76 of file qquickitem.h.

Referenced by QQuickControl::availableHeight(), QQuickContext2DImageTexture::beginPainting(), QQuickImage::boundingRect(), QQuickStyleItemTextField::calculateGeometry(), QQuickClippedText::clipHeight(), QQuickSaturationLightnessPicker::colorAt(), QQuickGridLayoutBase::componentComplete(), QQuickStackLayout::componentComplete(), QQuickItemGrabResultPrivate::create(), QQuickMaterialRipple::diameter(), QQuickFlow::doPositioning(), QQuickParticleEmitter::emitWindow(), QQuickTrailEmitter::emitWindow(), QQuickShapeGenericRenderer::endSync(), QQuickTextAreaPrivate::ensureCursorVisible(), QQuickGridViewPrivate::footerSize(), QQuickMultiEffect::geometryChange(), QQuickCanvasItem::geometryChange(), QQuickFlickable::geometryChange(), QDeclarativeCircleMapItem::geometryChange(), QDeclarativeGeoMap::geometryChange(), QQuickLoaderPrivate::getImplicitHeight(), QQuickGridViewPrivate::headerSize(), QQuickStackElement::initialize(), QQuickItemGroup::itemChange(), QQuickScrollBarAttachedPrivate::itemGeometryChanged(), QQuickScrollIndicatorAttachedPrivate::itemGeometryChanged(), QQuickItemGroup::itemImplicitHeightChanged(), QQuickScrollBarAttachedPrivate::layoutHorizontal(), QQuickScrollIndicatorAttachedPrivate::layoutHorizontal(), QQuickScrollBarAttachedPrivate::layoutVertical(), QQuickScrollIndicatorAttachedPrivate::layoutVertical(), QQuickVectorImagePrivate::loadSvg(), ViewportTransformHelper::map(), QQuick3DViewport::mapFrom3DScene(), QQuick3DViewport::mapTo3DScene(), QWaylandQuickItem::mapToSurface(), QQuickFlickable::maxYExtent(), QDeclarativeGeoMapItemGroup::onMapSizeChanged(), QQuickItemView::originY(), QmlJSDebugger::SelectionHighlight::paint(), QmlJSDebugger::HoverHighlight::paint(), QQuickBasicDial::paint(), QQuickFusionBusyIndicator::paint(), QQuickFusionDial::paint(), QQuickFusionKnob::paint(), QQuickMaterialTextContainer::paint(), QQuickUniversalFocusRectangle::paint(), positionAt(), QQuickItemViewTransitionableItem::prepareTransition(), QQuickApplicationWindowPrivate::relayout(), QQuickPagePrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickDrawerPositioner::reposition(), QQuickContext2D::reset(), QQuickTextAreaPrivate::resizeBackground(), QQuickPopupPrivate::resizeDimmer(), QQuickDrawerPrivate::resizeDimmer(), QQuickTextAreaPrivate::resizeFlickableControl(), QQuickSwipeViewPrivate::resizeItem(), QQuickDayOfWeekRowPrivate::resizeItems(), QQuickMonthGridPrivate::resizeItems(), QQuickWeekNumberColumnPrivate::resizeItems(), QQuickViewPrivate::rootObjectSize(), QQuickWidgetPrivate::rootObjectSize(), QQuickTargetDirection::sample(), QQuickScrollBarAttachedPrivate::scrollVertical(), QQuickFlipablePrivate::setBackTransform(), QQuick3DViewport::setCamera(), QQuickClippedText::setClipHeight(), QQuickTableView::setContentHeight(), QQuickContainer::setContentHeight(), QQuickPane::setContentHeight(), QQuickFlickable::setContentHeight(), QQuickStackLayout::setCurrentIndex(), QQuickRhiItem::setFixedColorBufferHeight(), QQuickGridLayoutItem::setGeometry(), setImplicitSize(), QDeclarativeGeoMapItemBase::setMap(), QQuickMenuBarItem::setMenu(), QDeclarativeGeoMap::setVisibleRegion(), QQuickParticleAffector::shouldAffect(), QQuickImageBase::sourceSize(), QQuickRhiItemNode::sync(), QQuickMaterialBusyIndicatorNode::sync(), QQuickMultiEffectPrivate::updateCenterOffset(), QOpenXRItemPrivate::updateContent(), QQuickListViewPrivate::updateCurrentSection(), QQuickSelectionRectanglePrivate::updateHandles(), QQuickListViewPrivate::updateHighlight(), QQuickImage::updatePaintedGeometry(), QQuickBorderImage::updatePaintNode(), QQuickFramebufferObject::updatePaintNode(), QQuickImage::updatePaintNode(), QQuickMouseArea::updatePaintNode(), QQuickMultiPointTouchArea::updatePaintNode(), QQuickPaintedItem::updatePaintNode(), QQuickRectangle::updatePaintNode(), QQuickRhiItem::updatePaintNode(), QQuickShaderEffectSource::updatePaintNode(), QQuickPaddedRectangle::updatePaintNode(), QQuickShape::updatePaintNode(), QQuickBasicBusyIndicator::updatePaintNode(), QQuickBasicProgressBar::updatePaintNode(), QQuickMaterialBusyIndicator::updatePaintNode(), QQuickMaterialProgressBar::updatePaintNode(), QQuickUniversalBusyIndicator::updatePaintNode(), QQuickUniversalProgressBar::updatePaintNode(), QWaylandQuickItem::updatePaintNode(), QQuickLayout::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QQuickMultiEffectPrivate::updateShadowOffset(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), QQuickMultiEffectPrivate::updateSourcePadding(), QQuick3DTexture::updateSpatialNode(), QQuickListViewPrivate::updateStickySections(), QQuickFlickableVisibleArea::updateVisible(), QQuickFlickable::vHeight(), QDeclarativeGeoMap::visibleRegion(), and QQuickFlickable::yflick().

◆ implicitHeight

◆ implicitWidth

◆ opacity

QQuickItem::opacity
readwrite

\qmlproperty real QtQuick::Item::opacity

This property holds the opacity of the item. Opacity is specified as a number between 0.0 (fully transparent) and 1.0 (fully opaque). The default value is 1.0.

When this property is set, the specified opacity is also applied individually to child items. This may have an unintended effect in some circumstances. For example in the second set of rectangles below, the red rectangle has specified an opacity of 0.5, which affects the opacity of its blue child rectangle even though the child has not specified an opacity.

\table \row

  • \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \row
  • \qml Item { Rectangle { opacity: 0.5 color: "red" width: 100; height: 100 Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \endtable

Changing an item's opacity does not affect whether the item receives user input events. (In contrast, setting \l visible property to false stops mouse events, and setting the \l enabled property to false stops mouse and keyboard events, and also removes active focus from the item.)

See also
visible

This property holds the opacity of the item. Opacity is specified as a number between 0.0 (fully transparent) and 1.0 (fully opaque). The default value is 1.0.

When this property is set, the specified opacity is also applied individually to child items. This may have an unintended effect in some circumstances. For example in the second set of rectangles below, the red rectangle has specified an opacity of 0.5, which affects the opacity of its blue child rectangle even though the child has not specified an opacity.

Values outside the range of 0 to 1 will be clamped.

\table \row

  • \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \row
  • \qml Item { Rectangle { opacity: 0.5 color: "red" width: 100; height: 100 Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \endtable

Changing an item's opacity does not affect whether the item receives user input events. (In contrast, setting \l visible property to false stops mouse events, and setting the \l enabled property to false stops mouse and keyboard events, and also removes active focus from the item.)

See also
visible

Definition at line 78 of file qquickitem.h.

Referenced by QQuickPopupPrivate::createOverlay(), QDeclarativeGeoMapItemBase::mapItemOpacity(), QDeclarativeGeoMapItemGroup::mapItemOpacity(), QQuickPopupPrivate::prepareExitTransition(), and Vsp2Layer::updateOpacity().

◆ parent

QQuickItem::parent
readwrite

\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.

Note
The concept of the {visual parent} differs from that of the {QObject parent}. An item's visual parent may not necessarily be the same as its object parent. See \l {Concepts - Visual Parent in Qt Quick} for more details.

This property holds the visual parent of the item.

Note
The concept of the {visual parent} differs from that of the {QObject parent}. An item's visual parent may not necessarily be the same as its object parent. See \l {Concepts - Visual Parent in Qt Quick} for more details.
The notification signal for this property gets emitted during destruction of the visual parent. C++ signal handlers cannot assume that items in the visual parent hierarchy are still fully constructed. Use \l qobject_cast to verify that items in the parent hierarchy can be used safely as the expected type.

Definition at line 67 of file qquickitem.h.

Referenced by QDeclarativeGeoMapCopyrightNotice::QDeclarativeGeoMapCopyrightNotice(), QQuickContentItem::QQuickContentItem(), QQuickItem(), QQuickItem(), QQuickItemParticle::QQuickItemParticle(), QQuickOverlay::QQuickOverlay(), QQuickPositionerAttached::QQuickPositionerAttached(), QQuickTableViewHoverHandler::QQuickTableViewHoverHandler(), QQuickWindowContainer::QQuickWindowContainer(), QDeclarativeGeoMap::~QDeclarativeGeoMap(), QQuickOverlay::~QQuickOverlay(), QDeclarativeGeoMapCopyrightNotice::anchorToBottomLeft(), QQuickGridLayoutBase::componentComplete(), findAttachedParent(), forceActiveFocus(), QQuickTableViewHoverHandler::handleEventPoint(), QDeclarativeGeoMap::isGroupNested(), QQml_setParent_noEvent(), QQuickPlaceholderText::textControl(), QQuickTableViewResizeHandler::updateDrag(), QQuickTableViewResizeHandler::updateState(), QQuickTableViewResizeHandler::wantsEventPoint(), and QQuickTableViewTapHandler::wantsEventPoint().

◆ rotation

QQuickItem::rotation
readwrite

\qmlproperty real QtQuick::Item::rotation This property holds the rotation of the item in degrees clockwise around its transformOrigin.

The default value is 0 degrees (that is, no rotation).

\table \row

  • \qml Rectangle { color: "blue" width: 100; height: 100 Rectangle { color: "red" x: 25; y: 25; width: 50; height: 50 rotation: 30 } } \endqml \endtable
See also
Transform, Rotation

This property holds the rotation of the item in degrees clockwise around its transformOrigin.

The default value is 0 degrees (that is, no rotation).

\table \row

  • \qml Rectangle { color: "blue" width: 100; height: 100 Rectangle { color: "red" x: 25; y: 25; width: 50; height: 50 rotation: 30 } } \endqml \endtable
See also
Transform, Rotation

Definition at line 106 of file qquickitem.h.

Referenced by QQuickDrawerPrivate::effectiveEdge(), and QQuickTransformAnimatorJob::Helper::sync().

◆ scale

QQuickItem::scale
readwrite

\qmlproperty real QtQuick::Item::scale This property holds the scale factor for this item.

A scale of less than 1.0 causes the item to be rendered at a smaller size, and a scale greater than 1.0 renders the item at a larger size. A negative scale causes the item to be mirrored when rendered.

The default value is 1.0.

Scaling is applied from the transformOrigin.

\table \row

  • \qml import QtQuick 2.0

Rectangle { color: "blue" width: 100; height: 100

Rectangle { color: "green" width: 25; height: 25 }

Rectangle { color: "red" x: 25; y: 25; width: 50; height: 50 scale: 1.4 transformOrigin: Item.TopLeft } } \endqml \endtable

See also
Transform, Scale

This property holds the scale factor for this item.

A scale of less than 1.0 causes the item to be rendered at a smaller size, and a scale greater than 1.0 renders the item at a larger size. A negative scale causes the item to be mirrored when rendered.

The default value is 1.0.

Scaling is applied from the transformOrigin.

\table \row

  • \qml import QtQuick 2.0

Rectangle { color: "blue" width: 100; height: 100

Rectangle { color: "green" width: 25; height: 25 }

Rectangle { color: "red" x: 25; y: 25; width: 50; height: 50 scale: 1.4 } } \endqml \endtable

See also
Transform, Scale

Definition at line 107 of file qquickitem.h.

Referenced by QQuickPinchArea::event(), QQuickStyleItemScrollBar::paintEvent(), QQuickPopupPrivate::prepareExitTransition(), QQuickPaintedItem::setContentsScale(), QQuickPopupPositioner::setParentItem(), QQuickPdfSelection::setRenderScale(), QDeclarativeGeoMapItemBase::setShapeTriangulationScale(), and QQuickTransformAnimatorJob::Helper::sync().

◆ smooth

QQuickItem::smooth
readwrite

\qmlproperty bool QtQuick::Item::smooth

Primarily used in image based items to decide if the item should use smooth sampling or not. Smooth sampling is performed using linear interpolation, while non-smooth is performed using nearest neighbor.

In Qt Quick 2.0, this property has minimal impact on performance.

By default, this property is set to true.

Specifies whether the item is smoothed or not

Primarily used in image based items to decide if the item should use smooth sampling or not. Smooth sampling is performed using linear interpolation, while non-smooth is performed using nearest neighbor.

In Qt Quick 2.0, this property has minimal impact on performance.

By default, this property is set to true.

Definition at line 112 of file qquickitem.h.

Referenced by setSmooth(), QQuickShaderEffectSource::textureProvider(), QQuickText::updatePaintNode(), QQuickTextInput::updatePaintNode(), QWaylandQuickItem::updatePaintNode(), and QGfxSourceProxy::updatePolish().

◆ transform

QQmlListProperty< QQuickTransform > QQuickItem::transform
read

\qmlproperty list<Transform> QtQuick::Item::transform This property holds the list of transformations to apply.

For more information see \l Transform.

Definition at line 110 of file qquickitem.h.

Referenced by QQuickItemGenerator::generateNodeBase(), and QQuickStyleItemScrollViewCorner::paintEvent().

◆ transformOrigin

QQuickItem::transformOrigin
readwrite

\qmlproperty enumeration QtQuick::Item::transformOrigin This property holds the origin point around which scale and rotation transform.

Nine transform origins are available, as shown in the image below. The default transform origin is Item.Center.

This example rotates an image around its bottom-right corner. \qml Image { source: "myimage.png" transformOrigin: Item.BottomRight rotation: 45 } \endqml

To set an arbitrary transform origin point use the \l Scale or \l Rotation transform types with \l transform.

This property holds the origin point around which scale and rotation transform.

Nine transform origins are available, as shown in the image below. The default transform origin is Item.Center.

Definition at line 108 of file qquickitem.h.

◆ transformOriginPoint

QQuickItem::transformOriginPoint
read

◆ visible

QQuickItem::visible
readwrite

\qmlproperty bool QtQuick::Item::visible

This property holds whether the item is visible. By default this is true.

Setting this property directly affects the visible value of child items. When set to false, the visible values of all child items also become false. When set to true, the visible values of child items are returned to true, unless they have explicitly been set to false.

(Because of this flow-on behavior, using the visible property may not have the intended effect if a property binding should only respond to explicit property changes. In such cases it may be better to use the \l opacity property instead.)

If this property is set to false, the item will no longer receive mouse events, but will continue to receive key events and will retain the keyboard \l focus if it has been set. (In contrast, setting the \l enabled property to false stops both mouse and keyboard events, and also removes focus from the item.)

Note
This property's value is only affected by changes to this property or the parent's visible property. It does not change, for example, if this item moves off-screen, or if the \l opacity changes to 0.
See also
opacity, enabled

This property holds whether the item is visible. By default this is true.

Setting this property directly affects the visible value of child items. When set to false, the visible values of all child items also become false. When set to true, the visible values of child items are returned to true, unless they have explicitly been set to false.

(Because of this flow-on behavior, using the visible property may not have the intended effect if a property binding should only respond to explicit property changes. In such cases it may be better to use the \l opacity property instead.)

If this property is set to false, the item will no longer receive mouse events, but will continue to receive key events and will retain the keyboard \l focus if it has been set. (In contrast, setting the \l enabled property to false stops both mouse and keyboard events, and also removes focus from the item.)

Note
This property's value is only affected by changes to this property or the parent's visible property. It does not change, for example, if this item moves off-screen, or if the \l opacity changes to 0. However, for historical reasons, this property is true after the item's construction, even if the item hasn't been added to a scene yet. Changing or reading this property of an item that has not been added to a scene might not produce the expected results.
The notification signal for this property gets emitted during destruction of the visual parent. C++ signal handlers cannot assume that items in the visual parent hierarchy are still fully constructed. Use \l qobject_cast to verify that items in the parent hierarchy can be used safely as the expected type.
See also
opacity, enabled

Definition at line 80 of file qquickitem.h.

Referenced by QDeclarativeGeoMap::setCopyrightsVisible(), QDeclarativeGeoMapCopyrightNotice::setCopyrightsVisible(), and QQuickMnemonicLabel::setMnemonicVisible().

◆ width

QQuickItem::width
readwrite

This property holds the width of this item.

Definition at line 75 of file qquickitem.h.

Referenced by QQuickSplitViewPrivate::accumulatedSize(), QQuickControl::availableWidth(), QQuickContext2DImageTexture::beginPainting(), QQuickImage::boundingRect(), QQuickClippedText::clipWidth(), QQuickSaturationLightnessPicker::colorAt(), FxGridItemSG::colPos(), QQuickGridLayoutBase::componentComplete(), QQuickStackLayout::componentComplete(), QQuickItemGrabResultPrivate::create(), QQuickSwipePrivate::createRelevantItemForDistance(), QQuickMaterialRipple::diameter(), QQuickRow::doPositioning(), QQuickGrid::doPositioning(), QQuickFlow::doPositioning(), QQuickParticleEmitter::emitWindow(), QQuickTrailEmitter::emitWindow(), QQuickShapeGenericRenderer::endSync(), QQuickTextAreaPrivate::ensureCursorVisible(), QQuickGridViewPrivate::footerSize(), QQuickMultiEffect::geometryChange(), QQuickCanvasItem::geometryChange(), QQuickFlickable::geometryChange(), QDeclarativeCircleMapItem::geometryChange(), QDeclarativeGeoMap::geometryChange(), QQuickLoaderPrivate::getImplicitWidth(), QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), QQuickGridViewPrivate::headerSize(), QQuickStackElement::initialize(), QQuickItemGroup::itemChange(), QQuickScrollBarAttachedPrivate::itemGeometryChanged(), QQuickScrollIndicatorAttachedPrivate::itemGeometryChanged(), QQuickItemGroup::itemImplicitWidthChanged(), QQuickScrollBarAttachedPrivate::layoutHorizontal(), QQuickScrollIndicatorAttachedPrivate::layoutHorizontal(), QQuickSplitViewPrivate::layoutResizeSplitItems(), QQuickScrollBarAttachedPrivate::layoutVertical(), QQuickScrollIndicatorAttachedPrivate::layoutVertical(), QQuickVectorImagePrivate::loadSvg(), ViewportTransformHelper::map(), QQuick3DViewport::mapFrom3DScene(), QQuick3DViewport::mapTo3DScene(), QWaylandQuickItem::mapToSurface(), QQuickFlickable::maxXExtent(), QDeclarativeGeoMapItemGroup::onMapSizeChanged(), QQuickItemView::originX(), QmlJSDebugger::SelectionHighlight::paint(), QmlJSDebugger::HoverHighlight::paint(), QQuickBasicDial::paint(), QQuickFusionBusyIndicator::paint(), QQuickFusionDial::paint(), QQuickFusionKnob::paint(), QQuickMaterialTextContainer::paint(), QQuickUniversalFocusRectangle::paint(), FxListItemSG::position(), QQuickSwitchPrivate::positionAt(), QQuickSwitchDelegatePrivate::positionAt(), positionAt(), QQuickItemViewTransitionableItem::prepareTransition(), QQuickApplicationWindowPrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickDrawerPositioner::reposition(), QQuickContext2D::reset(), QQuickTextAreaPrivate::resizeBackground(), QQuickPopupPrivate::resizeDimmer(), QQuickDrawerPrivate::resizeDimmer(), QQuickTextAreaPrivate::resizeFlickableControl(), QQuickSwipeViewPrivate::resizeItem(), QQuickMenuPrivate::resizeItem(), QQuickDayOfWeekRowPrivate::resizeItems(), QQuickMonthGridPrivate::resizeItems(), QQuickWeekNumberColumnPrivate::resizeItems(), QQuickViewPrivate::rootObjectSize(), QQuickWidgetPrivate::rootObjectSize(), QQuickTargetDirection::sample(), QQuickScrollBarAttachedPrivate::scrollHorizontal(), FxListItemSG::sectionSize(), QQuickFlipablePrivate::setBackTransform(), QQuick3DViewport::setCamera(), QQuickClippedText::setClipWidth(), QQuickTableView::setContentWidth(), QQuickContainer::setContentWidth(), QQuickPane::setContentWidth(), QQuickFlickable::setContentWidth(), QQuickStackLayout::setCurrentIndex(), QQuickRhiItem::setFixedColorBufferWidth(), QQuickGridLayoutItem::setGeometry(), setImplicitSize(), QDeclarativeGeoMapItemBase::setMap(), QDeclarativeGeoMap::setVisibleRegion(), QQuickParticleAffector::shouldAffect(), FxListItemSG::size(), QQuickRhiItemNode::sync(), QQuickMaterialBusyIndicatorNode::sync(), QQuickMultiEffectPrivate::updateCenterOffset(), QOpenXRItemPrivate::updateContent(), QQuickListViewPrivate::updateCurrentSection(), QQuickTableViewPrivate::updateEditItem(), QQuickGridViewPrivate::updateFooter(), QQuickSelectionRectanglePrivate::updateHandles(), QQuickListViewPrivate::updateHighlight(), QQuickTreeViewDelegatePrivate::updateIndicatorVisibility(), QQuickTabBarPrivate::updateLayout(), QQuickImage::updatePaintedGeometry(), QQuickBorderImage::updatePaintNode(), QQuickFramebufferObject::updatePaintNode(), QQuickImage::updatePaintNode(), QQuickMouseArea::updatePaintNode(), QQuickMultiPointTouchArea::updatePaintNode(), QQuickPaintedItem::updatePaintNode(), QQuickRectangle::updatePaintNode(), QQuickRhiItem::updatePaintNode(), QQuickShaderEffectSource::updatePaintNode(), QQuickPaddedRectangle::updatePaintNode(), QQuickShape::updatePaintNode(), QQuickBasicBusyIndicator::updatePaintNode(), QQuickBasicProgressBar::updatePaintNode(), QQuickMaterialBusyIndicator::updatePaintNode(), QQuickMaterialProgressBar::updatePaintNode(), QQuickUniversalBusyIndicator::updatePaintNode(), QQuickUniversalProgressBar::updatePaintNode(), QWaylandQuickItem::updatePaintNode(), QQuickLayout::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QQuickMultiEffectPrivate::updateShadowOffset(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), QQuickMultiEffectPrivate::updateSourcePadding(), QQuick3DTexture::updateSpatialNode(), QQuickListViewPrivate::updateStickySections(), QQuickFlickableVisibleArea::updateVisible(), QDeclarativeGeoMap::visibleRegion(), QQuickFlickable::vWidth(), and QQuickFlickable::xflick().

◆ x

QQuickItem::x
readwrite

\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item::width \qmlproperty real QtQuick::Item::height

Defines the item's position and size. The default value is 0.

The (x,y) position is relative to the \l parent.

\qml Item { x: 100; y: 100; width: 100; height: 100 } \endqml

Defines the item's x position relative to its parent.

Definition at line 72 of file qquickitem.h.

Referenced by QQuickParticleEmitter::burst(), QQuickAnchorsPrivate::centerInChanged(), QQuickTextInput::cursorRectangle(), QQuickParticleEmitter::emitWindow(), QDeclarativeCircleMapItem::geometryChange(), QDeclarativeGeoMapQuickItem::geometryChange(), QQuickScrollBarAttachedPrivate::itemGeometryChanged(), QQuickScrollIndicatorAttachedPrivate::itemGeometryChanged(), QQuickItemViewFxItem::itemX(), QQuickItemViewTransitionableItem::itemX(), QQuickSplitViewPrivate::layoutResizeSplitItems(), ViewportTransformHelper::map(), FxListItemSG::position(), QQuickTextInput::positionToRectangle(), QQuickItemViewTransitionableItem::prepareTransition(), QQuickApplicationWindowPrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickControlPrivate::resizeBackground(), QQuickLabelPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextFieldPrivate::resizeBackground(), QQuickDrawerPrivate::resizeDimmer(), QQuickTargetDirection::sample(), QQuickClippedText::setClipX(), QQuickFlickablePrivate::setViewportX(), QQuickTransformAnimatorJob::Helper::sync(), QQuickTreeViewDelegatePrivate::updateIndicatorVisibility(), and QDeclarativeGeoMapQuickItem::updatePolish().

◆ y

◆ z

QQuickItem::z
readwrite

\qmlproperty real QtQuick::Item::z

Sets the stacking order of sibling items. By default the stacking order is 0.

Items with a higher stacking value are drawn on top of siblings with a lower stacking order. Items with the same stacking value are drawn bottom up in the order they appear. Items with a negative stacking value are drawn under their parent's content.

The following example shows the various effects of stacking order.

\table \row

  • Same z - later children above earlier children: \qml Item { Rectangle { color: "red" width: 100; height: 100 } Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } \endqml \row
  • Higher z on top: \qml Item { Rectangle { z: 1 color: "red" width: 100; height: 100 } Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } \endqml \row
  • Same z - children above parents: \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \row
  • Lower z below: \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { z: -1 color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \endtable

Sets the stacking order of sibling items. By default the stacking order is 0.

Items with a higher stacking value are drawn on top of siblings with a lower stacking order. Items with the same stacking value are drawn bottom up in the order they appear. Items with a negative stacking value are drawn under their parent's content.

The following example shows the various effects of stacking order.

\table \row

  • Same z - later children above earlier children: \qml Item { Rectangle { color: "red" width: 100; height: 100 } Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } \endqml \row
  • Higher z on top: \qml Item { Rectangle { z: 1 color: "red" width: 100; height: 100 } Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } \endqml \row
  • Same z - children above parents: \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \row
  • Lower z below: \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { z: -1 color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \endtable

Definition at line 74 of file qquickitem.h.

Referenced by QDeclarativeGeoMap::itemChange(), itemZOrder_sort(), QWaylandQuickItemPrivate::placeAboveSibling(), QWaylandQuickItemPrivate::placeBelowSibling(), QQuickPopupPrivate::prepareEnterTransition(), QQuickControl::setBackground(), QQuickLabel::setBackground(), QQuickTextArea::setBackground(), QQuickTextField::setBackground(), QQuickPage::setFooter(), and QQuickPage::setHeader().


The documentation for this class was generated from the following files: