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
QQmlProperty Class Reference

The QQmlProperty class abstracts accessing properties on objects created from QML. More...

#include <qqmlproperty.h>

+ Collaboration diagram for QQmlProperty:

Public Types

enum  PropertyTypeCategory { InvalidCategory , List , Object , Normal }
 This enum specifies a category of QML property. More...
 
enum  Type { Invalid , Property , SignalProperty }
 This enum specifies a type of QML property. More...
 

Public Member Functions

 QQmlProperty ()
 Create an invalid QQmlProperty.
 
 ~QQmlProperty ()
 
 QQmlProperty (QObject *)
 Creates a QQmlProperty for the default property of obj.
 
 QQmlProperty (QObject *, QQmlContext *)
 Creates a QQmlProperty for the default property of obj using the \l{QQmlContext} {context} ctxt.
 
 QQmlProperty (QObject *, QQmlEngine *)
 Creates a QQmlProperty for the default property of obj using the environment for instantiating QML components that is provided by engine.
 
 QQmlProperty (QObject *, const QString &)
 Creates a QQmlProperty for the property name of obj.
 
 QQmlProperty (QObject *, const QString &, QQmlContext *)
 Creates a QQmlProperty for the property name of obj using the \l{QQmlContext} {context} ctxt.
 
 QQmlProperty (QObject *, const QString &, QQmlEngine *)
 Creates a QQmlProperty for the property name of obj using the environment for instantiating QML components that is provided by engine.
 
 QQmlProperty (const QQmlProperty &)
 Create a copy of other.
 
QQmlPropertyoperator= (const QQmlProperty &)
 Assign other to this QQmlProperty.
 
 QQmlProperty (QQmlProperty &&other) noexcept
 
void swap (QQmlProperty &other) noexcept
 
bool operator== (const QQmlProperty &) const
 Returns true if other and this QQmlProperty represent the same property.
 
Type type () const
 Returns the type of the property.
 
bool isValid () const
 Returns true if the QQmlProperty refers to a valid property, otherwise false.
 
bool isProperty () const
 Returns true if this QQmlProperty represents a regular Qt property.
 
bool isSignalProperty () const
 Returns true if this QQmlProperty represents a QML signal property.
 
int propertyType () const
 Returns the metatype id of the property, or QMetaType::UnknownType if the property has no metatype.
 
QMetaType propertyMetaType () const
 Returns the metatype of the property.
 
PropertyTypeCategory propertyTypeCategory () const
 Returns the property category.
 
const char * propertyTypeName () const
 Returns the type name of the property, or 0 if the property has no type name.
 
QString name () const
 Return the name of this QML property.
 
QVariant read () const
 Returns the property value.
 
bool write (const QVariant &) const
 Sets the property value to value.
 
bool reset () const
 Resets the property and returns true if the property is resettable.
 
bool hasNotifySignal () const
 Returns true if the property has a change notifier signal, otherwise false.
 
bool needsNotifySignal () const
 Returns true if the property needs a change notifier signal for bindings to remain upto date, false otherwise.
 
bool connectNotifySignal (QObject *dest, const char *slot) const
 Connects the property's change notifier signal to the specified slot of the dest object and returns true.
 
bool connectNotifySignal (QObject *dest, int method) const
 Connects the property's change notifier signal to the specified method of the dest object and returns true.
 
bool isWritable () const
 Returns true if the property is writable, otherwise false.
 
bool isBindable () const
 
bool isDesignable () const
 Returns true if the property is designable, otherwise false.
 
bool isResettable () const
 Returns true if the property is resettable, otherwise false.
 
QObjectobject () const
 Returns the QQmlProperty's QObject.
 
int index () const
 Return the Qt metaobject index of the property.
 
QMetaProperty property () const
 Returns the \l{QMetaProperty} {Qt property} associated with this QML property.
 
QMetaMethod method () const
 Return the QMetaMethod for this property if it is a SignalProperty, otherwise returns an invalid QMetaMethod.
 

Static Public Member Functions

static QVariant read (const QObject *, const QString &)
 Return the name property value of object.
 
static QVariant read (const QObject *, const QString &, QQmlContext *)
 Return the name property value of object using the \l{QQmlContext} {context} ctxt.
 
static QVariant read (const QObject *, const QString &, QQmlEngine *)
 Return the name property value of object using the environment for instantiating QML components that is provided by engine.
 
static bool write (QObject *, const QString &, const QVariant &)
 Writes value to the name property of object.
 
static bool write (QObject *, const QString &, const QVariant &, QQmlContext *)
 Writes value to the name property of object using the \l{QQmlContext} {context} ctxt.
 
static bool write (QObject *, const QString &, const QVariant &, QQmlEngine *)
 Writes value to the name property of object using the environment for instantiating QML components that is provided by engine.
 

Properties

QML_ANONYMOUSQObject * object
 
QString name
 

Friends

class QQmlPropertyPrivate
 

Detailed Description

The QQmlProperty class abstracts accessing properties on objects created from QML.

Since
5.0 \inmodule QtQml

As QML uses Qt's meta-type system all of the existing QMetaObject classes can be used to introspect and interact with objects created by QML. However, some of the new features provided by QML - such as type safety and attached properties - are most easily used through the QQmlProperty class that simplifies some of their natural complexity.

Unlike QMetaProperty which represents a property on a class type, QQmlProperty encapsulates a property on a specific object instance. To read a property's value, programmers create a QQmlProperty instance and call the read() method. Likewise to write a property value the write() method is used.

For example, for the following QML code:

\qml MyItem.qml import QtQuick 2.0

Text { text: "A bit of text" } \endqml

The \l Text object's properties could be accessed using QQmlProperty, like this:

#include <QQmlProperty>
#include <QGraphicsObject>
...
QQuickView view(QUrl::fromLocalFile("MyItem.qml"));
QQmlProperty property(view.rootObject(), "font.pixelSize");
qWarning() << "Current pixel size:" << property.read().toInt();
property.write(24);
qWarning() << "Pixel size should now be 24:" << property.read().toInt();
The QQmlProperty class abstracts accessing properties on objects created from QML.
QMetaProperty property() const
Returns the \l{QMetaProperty} {Qt property} associated with this QML property.
QQuickItem * rootObject() const
Returns the view's root \l {QQuickItem} {item}.
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
Definition qurl.cpp:3367
#define qWarning
Definition qlogging.h:166
QQuickView * view
[0]

Definition at line 22 of file qqmlproperty.h.

Member Enumeration Documentation

◆ PropertyTypeCategory

This enum specifies a category of QML property.

\value InvalidCategory The property is invalid, or is a signal property. \value List The property is a QQmlListProperty list property \value Object The property is a QObject derived type pointer \value Normal The property is a normal value property.

Enumerator
InvalidCategory 
List 
Object 
Normal 

Definition at line 31 of file qqmlproperty.h.

◆ Type

This enum specifies a type of QML property.

\value Invalid The property is invalid. \value Property The property is a regular Qt property. \value SignalProperty The property is a signal property.

Enumerator
Invalid 
Property 
SignalProperty 

Definition at line 38 of file qqmlproperty.h.

Constructor & Destructor Documentation

◆ QQmlProperty() [1/9]

QQmlProperty::QQmlProperty ( )
default

Create an invalid QQmlProperty.

◆ ~QQmlProperty()

QQmlProperty::~QQmlProperty ( )

Definition at line 86 of file qqmlproperty.cpp.

References QQmlRefCounted< T >::release().

+ Here is the call graph for this function:

◆ QQmlProperty() [2/9]

QQmlProperty::QQmlProperty ( QObject * obj)

Creates a QQmlProperty for the default property of obj.

If there is no default property, an invalid QQmlProperty will be created.

Definition at line 97 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::initDefault().

+ Here is the call graph for this function:

◆ QQmlProperty() [3/9]

QQmlProperty::QQmlProperty ( QObject * obj,
QQmlContext * ctxt )

Creates a QQmlProperty for the default property of obj using the \l{QQmlContext} {context} ctxt.

If there is no default property, an invalid QQmlProperty will be created.

Definition at line 109 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::context, QQmlContext::engine(), QQmlPropertyPrivate::engine, QQmlContextData::get(), and QQmlPropertyPrivate::initDefault().

+ Here is the call graph for this function:

◆ QQmlProperty() [4/9]

QQmlProperty::QQmlProperty ( QObject * obj,
QQmlEngine * engine )

Creates a QQmlProperty for the default property of obj using the environment for instantiating QML components that is provided by engine.

If there is no default property, an invalid QQmlProperty will be created.

Definition at line 125 of file qqmlproperty.cpp.

References engine, QQmlPropertyPrivate::engine, and QQmlPropertyPrivate::initDefault().

+ Here is the call graph for this function:

◆ QQmlProperty() [5/9]

QQmlProperty::QQmlProperty ( QObject * obj,
const QString & name )

Creates a QQmlProperty for the property name of obj.

Definition at line 149 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::initProperty(), isValid(), and QQmlPropertyPrivate::object.

+ Here is the call graph for this function:

◆ QQmlProperty() [6/9]

QQmlProperty::QQmlProperty ( QObject * obj,
const QString & name,
QQmlContext * ctxt )

Creates a QQmlProperty for the property name of obj using the \l{QQmlContext} {context} ctxt.

Creating a QQmlProperty without a context will render some properties - like attached properties - inaccessible.

Definition at line 163 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::context, QQmlContext::engine(), QQmlPropertyPrivate::engine, QQmlContextData::get(), QQmlPropertyPrivate::initProperty(), isValid(), QQmlPropertyPrivate::object, and QQmlRefPointer< T >::reset().

+ Here is the call graph for this function:

◆ QQmlProperty() [7/9]

QQmlProperty::QQmlProperty ( QObject * obj,
const QString & name,
QQmlEngine * engine )

Creates a QQmlProperty for the property name of obj using the environment for instantiating QML components that is provided by engine.

Definition at line 184 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::context, engine, QQmlPropertyPrivate::engine, QQmlPropertyPrivate::initProperty(), isValid(), QQmlPropertyPrivate::object, and QQmlRefPointer< T >::reset().

+ Here is the call graph for this function:

◆ QQmlProperty() [8/9]

QQmlProperty::QQmlProperty ( const QQmlProperty & other)

Create a copy of other.

Definition at line 483 of file qqmlproperty.cpp.

References QQmlRefCount::addref(), and other().

+ Here is the call graph for this function:

◆ QQmlProperty() [9/9]

QQmlProperty::QQmlProperty ( QQmlProperty && other)
inlinenoexcept

Definition at line 58 of file qqmlproperty.h.

Member Function Documentation

◆ connectNotifySignal() [1/2]

bool QQmlProperty::connectNotifySignal ( QObject * dest,
const char * slot ) const

Connects the property's change notifier signal to the specified slot of the dest object and returns true.

Returns false if this metaproperty does not represent a regular Qt property or if it has no change notifier signal, or if the dest object does not have the specified slot.

Note
slot should be passed using the SLOT() macro so it is correctly identified.

Definition at line 1897 of file qqmlproperty.cpp.

References QObject::connect(), QQmlPropertyPrivate::core, QQmlPropertyData::coreIndex(), QMetaProperty::hasNotifySignal(), QMetaMethod::methodSignature(), QMetaProperty::notifySignal(), QQmlPropertyPrivate::object, QObject::property(), signal, and type().

+ Here is the call graph for this function:

◆ connectNotifySignal() [2/2]

bool QQmlProperty::connectNotifySignal ( QObject * dest,
int method ) const

Connects the property's change notifier signal to the specified method of the dest object and returns true.

Returns false if this metaproperty does not represent a regular Qt property or if it has no change notifier signal, or if the dest object does not have the specified method.

Definition at line 1873 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::connect(), QQmlPropertyPrivate::core, QQmlPropertyData::coreIndex(), Qt::DirectConnection, QMetaProperty::hasNotifySignal(), method(), QMetaProperty::notifySignalIndex(), QQmlPropertyPrivate::object, QObject::property(), and type().

+ Here is the call graph for this function:

◆ hasNotifySignal()

bool QQmlProperty::hasNotifySignal ( ) const

Returns true if the property has a change notifier signal, otherwise false.

Definition at line 1845 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, QQmlPropertyData::coreIndex(), QQmlPropertyPrivate::object, QObject::property(), and type().

+ Here is the call graph for this function:

◆ index()

int QQmlProperty::index ( ) const

Return the Qt metaobject index of the property.

Definition at line 1914 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, and QQmlPropertyData::coreIndex().

Referenced by QQmlComponentPrivate::setInitialProperty(), and QQmlBindEntry::setTarget().

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

◆ isBindable()

bool QQmlProperty::isBindable ( ) const

Returns true if the property is bindable, otherwise false.

Definition at line 690 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, QQmlPropertyData::isBindable(), QQmlPropertyData::isValid(), and QQmlPropertyPrivate::object.

Referenced by QQmlAnyBinding::createFromCodeString(), QQmlAnyBinding::createFromFunction(), QQmlAnyBinding::createFromScriptString(), QQmlAnyBinding::ofProperty(), QQmlAnyBinding::removeBindingFrom(), QQmlComponentPrivate::setInitialProperty(), and QQmlAnyBinding::takeFrom().

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

◆ isDesignable()

bool QQmlProperty::isDesignable ( ) const

Returns true if the property is designable, otherwise false.

Definition at line 704 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, QQmlPropertyData::coreIndex(), QQmlPropertyData::isValid(), QQmlPropertyPrivate::object, QObject::property(), and type().

+ Here is the call graph for this function:

◆ isProperty()

bool QQmlProperty::isProperty ( ) const

Returns true if this QQmlProperty represents a regular Qt property.

Definition at line 636 of file qqmlproperty.cpp.

References Property, and type().

+ Here is the call graph for this function:

◆ isResettable()

bool QQmlProperty::isResettable ( ) const

Returns true if the property is resettable, otherwise false.

Definition at line 717 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, QQmlPropertyData::isResettable(), QQmlPropertyData::isValid(), QQmlPropertyPrivate::object, and type().

Referenced by reset().

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

◆ isSignalProperty()

bool QQmlProperty::isSignalProperty ( ) const

Returns true if this QQmlProperty represents a QML signal property.

Definition at line 644 of file qqmlproperty.cpp.

References SignalProperty, and type().

Referenced by QQuickPropertyChangesPrivate::decodeBinding().

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

◆ isValid()

bool QQmlProperty::isValid ( ) const

Returns true if the QQmlProperty refers to a valid property, otherwise false.

Definition at line 731 of file qqmlproperty.cpp.

References Invalid, and type().

Referenced by QQmlProperty(), QQmlProperty(), QQmlProperty(), QQuickStateAction::QQuickStateAction(), QQuickStateAction::QQuickStateAction(), QQuickPropertyChanges::actions(), QQuickDesignerSupport::anchorLineTarget(), QQuickAbstractAnimationPrivate::createProperty(), QQmlBindPrivate::decodeBinding(), QQmlIncubatorPrivate::incubate(), QQuickPropertyChangesPrivate::property(), QQmlComponentPrivate::removePropertyFromRequired(), QQmlComponentPrivate::setInitialProperty(), QQuickImageSelector::setSource(), and QQmlBindPrivate::validate().

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

◆ isWritable()

bool QQmlProperty::isWritable ( ) const

Returns true if the property is writable, otherwise false.

Definition at line 670 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, QQmlPropertyData::isFunction(), QQmlPropertyData::isQList(), QQmlPropertyData::isValid(), QQmlPropertyData::isWritable(), and QQmlPropertyPrivate::object.

Referenced by QQuickAbstractAnimationPrivate::createProperty(), QQuickPropertyChangesPrivate::property(), and QQmlBindEntry::validate().

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

◆ method()

QMetaMethod QQmlProperty::method ( ) const

Return the QMetaMethod for this property if it is a SignalProperty, otherwise returns an invalid QMetaMethod.

Definition at line 782 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, QQmlPropertyData::coreIndex(), QQmlPropertyPrivate::object, SignalProperty, and type().

Referenced by connectNotifySignal().

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

◆ name()

QString QQmlProperty::name ( ) const

◆ needsNotifySignal()

bool QQmlProperty::needsNotifySignal ( ) const

Returns true if the property needs a change notifier signal for bindings to remain upto date, false otherwise.

Some properties, such as attached properties or those whose value never changes, do not require a change notifier.

Definition at line 1860 of file qqmlproperty.cpp.

References QMetaProperty::isConstant(), property(), and type().

+ Here is the call graph for this function:

◆ object()

QObject * QQmlProperty::object ( ) const

Returns the QQmlProperty's QObject.

Definition at line 652 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::object.

◆ operator=()

QQmlProperty & QQmlProperty::operator= ( const QQmlProperty & other)

Assign other to this QQmlProperty.

Definition at line 660 of file qqmlproperty.cpp.

References other(), and qSwap().

+ Here is the call graph for this function:

◆ operator==()

bool QQmlProperty::operator== ( const QQmlProperty & other) const

Returns true if other and this QQmlProperty represent the same property.

Definition at line 566 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, QQmlPropertyData::coreIndex(), QQmlPropertyPrivate::object, other(), and QQmlPropertyPrivate::valueTypeData.

+ Here is the call graph for this function:

◆ property()

QMetaProperty QQmlProperty::property ( ) const

Returns the \l{QMetaProperty} {Qt property} associated with this QML property.

Definition at line 768 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, QQmlPropertyData::coreIndex(), QQmlPropertyData::isValid(), QQmlPropertyPrivate::object, QObject::property(), and type().

Referenced by QQuickSimpleAction::QQuickSimpleAction(), QQuickPropertyChanges::actions(), QQuickState::apply(), QQuickPropertyChanges::changeExpression(), QQuickPropertyChanges::changeValue(), needsNotifySignal(), QQmlAnyBinding::ofProperty(), QQuickState::removeAllEntriesFromRevertList(), QQmlAnyBinding::removeBindingFrom(), QQuickState::removeEntryFromRevertList(), QQmlAnyBinding::takeFrom(), QQuickSpringAnimation::transition(), and QQuickBehavior::write().

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

◆ propertyMetaType()

QMetaType QQmlProperty::propertyMetaType ( ) const

Returns the metatype of the property.

See also
propertyType

Definition at line 593 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::propertyType().

+ Here is the call graph for this function:

◆ propertyType()

int QQmlProperty::propertyType ( ) const

Returns the metatype id of the property, or QMetaType::UnknownType if the property has no metatype.

See also
propertyMetaType

Definition at line 583 of file qqmlproperty.cpp.

References QMetaType::id(), QQmlPropertyPrivate::propertyType(), and QMetaType::UnknownType.

Referenced by QQuickPropertyAnimation::createTransitionActions(), and QQuickAnimationPropertyUpdater::setValue().

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

◆ propertyTypeCategory()

QQmlProperty::PropertyTypeCategory QQmlProperty::propertyTypeCategory ( ) const

Returns the property category.

Definition at line 514 of file qqmlproperty.cpp.

References InvalidCategory, and QQmlPropertyPrivate::propertyTypeCategory().

+ Here is the call graph for this function:

◆ propertyTypeName()

const char * QQmlProperty::propertyTypeName ( ) const

Returns the type name of the property, or 0 if the property has no type name.

Definition at line 547 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::core, QQmlPropertyData::coreIndex(), QQmlPropertyData::isValid(), QQmlPropertyPrivate::isValueType(), QQmlMetaType::metaObjectForValueType(), QQmlPropertyPrivate::object, QObject::property(), QQmlPropertyData::propType(), Q_ASSERT, QVariant::typeName(), and QQmlPropertyPrivate::valueTypeData.

+ Here is the call graph for this function:

◆ read() [1/4]

QVariant QQmlProperty::read ( ) const

Returns the property value.

Definition at line 1062 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::object, QQmlPropertyPrivate::readValueProperty(), SignalProperty, and type().

Referenced by QQuickDesignerSupport::anchorLineTarget(), QQuickAnimatorPrivate::apply(), QQuickPropertyChanges::changeExpression(), QQuickPropertyChanges::changeValue(), QQuickImageSelector::componentComplete(), main(), QQuickAnimationPropertyUpdater::setValue(), and QQuickTransitionManager::transition().

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

◆ read() [2/4]

QVariant QQmlProperty::read ( const QObject * object,
const QString & name )
static

Return the name property value of object.

This method is equivalent to:

QQmlProperty p(object, name);
p.read();
GLuint name
GLfloat GLfloat p
[1]

Definition at line 1088 of file qqmlproperty.cpp.

◆ read() [3/4]

QVariant QQmlProperty::read ( const QObject * object,
const QString & name,
QQmlContext * ctxt )
static

Return the name property value of object using the \l{QQmlContext} {context} ctxt.

This method is equivalent to:

p.read();
static void * context

Definition at line 1104 of file qqmlproperty.cpp.

◆ read() [4/4]

QVariant QQmlProperty::read ( const QObject * object,
const QString & name,
QQmlEngine * engine )
static

Return the name property value of object using the environment for instantiating QML components that is provided by engine.

This method is equivalent to:

p.read();
QJSEngine engine
[0]

Definition at line 1121 of file qqmlproperty.cpp.

References engine.

◆ reset()

bool QQmlProperty::reset ( ) const

Resets the property and returns true if the property is resettable.

If the property is not resettable, nothing happens and false is returned.

Definition at line 1819 of file qqmlproperty.cpp.

References args, QQmlPropertyPrivate::core, QQmlPropertyData::coreIndex(), isResettable(), QMetaObject::metacall(), QQmlPropertyPrivate::object, and QMetaObject::ResetProperty.

+ Here is the call graph for this function:

◆ swap()

void QQmlProperty::swap ( QQmlProperty & other)
inlinenoexcept

Definition at line 61 of file qqmlproperty.h.

References d, other(), and qt_ptr_swap().

+ Here is the call graph for this function:

◆ type()

QQmlProperty::Type QQmlProperty::type ( ) const

Returns the type of the property.

Definition at line 628 of file qqmlproperty.cpp.

References Invalid, and QQmlPropertyPrivate::type().

Referenced by connectNotifySignal(), connectNotifySignal(), hasNotifySignal(), isDesignable(), isProperty(), isResettable(), isSignalProperty(), isValid(), method(), name(), needsNotifySignal(), property(), QQuickPropertyChangesPrivate::property(), and read().

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

◆ write() [1/4]

bool QQmlProperty::write ( const QVariant & value) const

Sets the property value to value.

Returns true on success, or false if the property can't be set because the value is the wrong type, for example.

Definition at line 1751 of file qqmlproperty.cpp.

References QQmlPropertyPrivate::write().

Referenced by QQuickPopupPrivate::hideDimmer(), QQmlIncubatorPrivate::incubate(), main(), and QQuickPopupPrivate::showDimmer().

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

◆ write() [2/4]

bool QQmlProperty::write ( QObject * object,
const QString & name,
const QVariant & value )
static

Writes value to the name property of object.

This method is equivalent to:

QQmlProperty p(object, name);
p.write(value);
EGLOutputLayerEXT EGLint EGLAttrib value
[5]

Returns true on success, false otherwise.

Definition at line 1767 of file qqmlproperty.cpp.

◆ write() [3/4]

bool QQmlProperty::write ( QObject * object,
const QString & name,
const QVariant & value,
QQmlContext * ctxt )
static

Writes value to the name property of object using the \l{QQmlContext} {context} ctxt.

This method is equivalent to:

QQmlProperty p(object, name, ctxt);
p.write(value);

Returns true on success, false otherwise.

Definition at line 1785 of file qqmlproperty.cpp.

◆ write() [4/4]

bool QQmlProperty::write ( QObject * object,
const QString & name,
const QVariant & value,
QQmlEngine * engine )
static

Writes value to the name property of object using the environment for instantiating QML components that is provided by engine.

This method is equivalent to:

p.write(value);

Returns true on success, false otherwise.

Definition at line 1807 of file qqmlproperty.cpp.

References engine.

Friends And Related Symbol Documentation

◆ QQmlPropertyPrivate

friend class QQmlPropertyPrivate
friend

Definition at line 104 of file qqmlproperty.h.

Property Documentation

◆ name

◆ object


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