Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 2cba8df17162abb32fcb8e6852f3eacc > files > 162

qtdeclarative5-doc-5.9.4-1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qqmlproperty.cpp -->
  <title>QQmlProperty Class | Qt QML 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtqml-index.html">Qt QML</a></td><td ><a href="qtqml-module.html">C++ Classes</a></td><td >QQmlProperty</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QQmlProperty Class</h1>
<!-- $$$QQmlProperty-brief -->
<p>The <a href="qqmlproperty.html">QQmlProperty</a> class abstracts accessing properties on objects created from QML. <a href="#details">More...</a></p>
<!-- @@@QQmlProperty -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QQmlProperty&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += qml</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.0</td></tr></table></div><ul>
<li><a href="qqmlproperty-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#PropertyTypeCategory-enum">PropertyTypeCategory</a></b> { InvalidCategory, List, Object, Normal }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#Type-enum">Type</a></b> { Invalid, Property, SignalProperty }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#QQmlProperty-1">QQmlProperty</a></b>(QObject *<i>obj</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#QQmlProperty-2">QQmlProperty</a></b>(QObject *<i>obj</i>, QQmlContext *<i>ctxt</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#QQmlProperty-3">QQmlProperty</a></b>(QObject *<i>obj</i>, QQmlEngine *<i>engine</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#QQmlProperty-4">QQmlProperty</a></b>(QObject *<i>obj</i>, const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#QQmlProperty-5">QQmlProperty</a></b>(QObject *<i>obj</i>, const QString &amp;<i>name</i>, QQmlContext *<i>ctxt</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#QQmlProperty-6">QQmlProperty</a></b>(QObject *<i>obj</i>, const QString &amp;<i>name</i>, QQmlEngine *<i>engine</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#QQmlProperty-7">QQmlProperty</a></b>(const QQmlProperty &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#connectNotifySignal">connectNotifySignal</a></b>(QObject *<i>dest</i>, const char *<i>slot</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#connectNotifySignal-1">connectNotifySignal</a></b>(QObject *<i>dest</i>, int <i>method</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#hasNotifySignal">hasNotifySignal</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#index">index</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#isDesignable">isDesignable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#isProperty">isProperty</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#isResettable">isResettable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#isSignalProperty">isSignalProperty</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#isValid">isValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#isWritable">isWritable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMetaMethod </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#method">method</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#name">name</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#needsNotifySignal">needsNotifySignal</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QObject *</td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#object">object</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMetaProperty </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#property">property</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#propertyType">propertyType</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> PropertyTypeCategory </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#propertyTypeCategory">propertyTypeCategory</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const char *</td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#propertyTypeName">propertyTypeName</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#read">read</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#reset">reset</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Type </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#type">type</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#write">write</a></b>(const QVariant &amp;<i>value</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQmlProperty &amp;</td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#operator-eq">operator=</a></b>(const QQmlProperty &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#operator-eq-eq">operator==</a></b>(const QQmlProperty &amp;<i>other</i>) const</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#read-1">read</a></b>(const QObject *<i>object</i>, const QString &amp;<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#read-2">read</a></b>(const QObject *<i>object</i>, const QString &amp;<i>name</i>, QQmlContext *<i>ctxt</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#read-3">read</a></b>(const QObject *<i>object</i>, const QString &amp;<i>name</i>, QQmlEngine *<i>engine</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#write-1">write</a></b>(QObject *<i>object</i>, const QString &amp;<i>name</i>, const QVariant &amp;<i>value</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#write-2">write</a></b>(QObject *<i>object</i>, const QString &amp;<i>name</i>, const QVariant &amp;<i>value</i>, QQmlContext *<i>ctxt</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#write-3">write</a></b>(QObject *<i>object</i>, const QString &amp;<i>name</i>, const QVariant &amp;<i>value</i>, QQmlEngine *<i>engine</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QQmlProperty-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qqmlproperty.html">QQmlProperty</a> class abstracts accessing properties on objects created from QML.</p>
<p>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 <a href="qqmlproperty.html">QQmlProperty</a> class that simplifies some of their natural complexity.</p>
<p>Unlike QMetaProperty which represents a property on a class type, <a href="qqmlproperty.html">QQmlProperty</a> encapsulates a property on a specific object instance. To read a property's value, programmers create a <a href="qqmlproperty.html">QQmlProperty</a> instance and call the <a href="qqmlproperty.html#read">read</a>() method. Likewise to write a property value the <a href="qqmlproperty.html#write">write</a>() method is used.</p>
<p>For example, for the following QML code:</p>
<pre class="qml">

  <span class="comment">// MyItem.qml</span>
  import QtQuick 2.0

  <span class="type">Text</span> { <span class="name">text</span>: <span class="string">&quot;A bit of text&quot;</span> }

</pre>
<p>The Text object's properties could be accessed using <a href="qqmlproperty.html">QQmlProperty</a>, like this:</p>
<pre class="cpp">

  <span class="preprocessor">#include &lt;QQmlProperty&gt;</span>
  <span class="preprocessor">#include &lt;QGraphicsObject&gt;</span>

  <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>

  <span class="type">QQuickView</span> view(<span class="type">QUrl</span><span class="operator">::</span>fromLocalFile(<span class="string">&quot;MyItem.qml&quot;</span>));
  <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> property(view<span class="operator">.</span>rootObject()<span class="operator">,</span> <span class="string">&quot;font.pixelSize&quot;</span>);
  qWarning() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Current pixel size:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> property<span class="operator">.</span>read()<span class="operator">.</span>toInt();
  property<span class="operator">.</span>write(<span class="number">24</span>);
  qWarning() <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="string">&quot;Pixel size should now be 24:&quot;</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> property<span class="operator">.</span>read()<span class="operator">.</span>toInt();

</pre>
<p>The Qt Quick 1 version of this class was named QDeclarativeProperty.</p>
</div>
<!-- @@@QQmlProperty -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$PropertyTypeCategory$$$InvalidCategory$$$List$$$Object$$$Normal -->
<h3 class="fn" id="PropertyTypeCategory-enum"><a name="PropertyTypeCategory-enum"></a>enum QQmlProperty::<span class="name">PropertyTypeCategory</span></h3>
<p>This enum specifies a category of QML property.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QQmlProperty::InvalidCategory</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The property is invalid, or is a signal property.</td></tr>
<tr><td class="topAlign"><code>QQmlProperty::List</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The property is a <a href="qqmllistproperty.html">QQmlListProperty</a> list property</td></tr>
<tr><td class="topAlign"><code>QQmlProperty::Object</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The property is a QObject derived type pointer</td></tr>
<tr><td class="topAlign"><code>QQmlProperty::Normal</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The property is a normal value property.</td></tr>
</table></div>
<!-- @@@PropertyTypeCategory -->
<!-- $$$Type$$$Invalid$$$Property$$$SignalProperty -->
<h3 class="fn" id="Type-enum"><a name="Type-enum"></a>enum QQmlProperty::<span class="name">Type</span></h3>
<p>This enum specifies a type of QML property.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QQmlProperty::Invalid</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The property is invalid.</td></tr>
<tr><td class="topAlign"><code>QQmlProperty::Property</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The property is a regular Qt property.</td></tr>
<tr><td class="topAlign"><code>QQmlProperty::SignalProperty</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The property is a signal property.</td></tr>
</table></div>
<!-- @@@Type -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QQmlProperty[overload1]$$$QQmlProperty -->
<h3 class="fn" id="QQmlProperty"><a name="QQmlProperty"></a>QQmlProperty::<span class="name">QQmlProperty</span>()</h3>
<p>Create an invalid <a href="qqmlproperty.html">QQmlProperty</a>.</p>
<!-- @@@QQmlProperty -->
<!-- $$$QQmlProperty$$$QQmlPropertyQObject* -->
<h3 class="fn" id="QQmlProperty-1"><a name="QQmlProperty-1"></a>QQmlProperty::<span class="name">QQmlProperty</span>(<span class="type">QObject</span> *<i>obj</i>)</h3>
<p>Creates a <a href="qqmlproperty.html">QQmlProperty</a> for the default property of <i>obj</i>. If there is no default property, an invalid <a href="qqmlproperty.html">QQmlProperty</a> will be created.</p>
<!-- @@@QQmlProperty -->
<!-- $$$QQmlProperty$$$QQmlPropertyQObject*QQmlContext* -->
<h3 class="fn" id="QQmlProperty-2"><a name="QQmlProperty-2"></a>QQmlProperty::<span class="name">QQmlProperty</span>(<span class="type">QObject</span> *<i>obj</i>, <span class="type"><a href="qqmlcontext.html">QQmlContext</a></span> *<i>ctxt</i>)</h3>
<p>Creates a <a href="qqmlproperty.html">QQmlProperty</a> for the default property of <i>obj</i> using the <a href="qqmlcontext.html">context</a> <i>ctxt</i>. If there is no default property, an invalid <a href="qqmlproperty.html">QQmlProperty</a> will be created.</p>
<!-- @@@QQmlProperty -->
<!-- $$$QQmlProperty$$$QQmlPropertyQObject*QQmlEngine* -->
<h3 class="fn" id="QQmlProperty-3"><a name="QQmlProperty-3"></a>QQmlProperty::<span class="name">QQmlProperty</span>(<span class="type">QObject</span> *<i>obj</i>, <span class="type"><a href="qqmlengine.html">QQmlEngine</a></span> *<i>engine</i>)</h3>
<p>Creates a <a href="qqmlproperty.html">QQmlProperty</a> for the default property of <i>obj</i> using the environment for instantiating QML components that is provided by <i>engine</i>. If there is no default property, an invalid <a href="qqmlproperty.html">QQmlProperty</a> will be created.</p>
<!-- @@@QQmlProperty -->
<!-- $$$QQmlProperty$$$QQmlPropertyQObject*constQString& -->
<h3 class="fn" id="QQmlProperty-4"><a name="QQmlProperty-4"></a>QQmlProperty::<span class="name">QQmlProperty</span>(<span class="type">QObject</span> *<i>obj</i>, const <span class="type">QString</span> &amp;<i>name</i>)</h3>
<p>Creates a <a href="qqmlproperty.html">QQmlProperty</a> for the property <i>name</i> of <i>obj</i>.</p>
<!-- @@@QQmlProperty -->
<!-- $$$QQmlProperty$$$QQmlPropertyQObject*constQString&QQmlContext* -->
<h3 class="fn" id="QQmlProperty-5"><a name="QQmlProperty-5"></a>QQmlProperty::<span class="name">QQmlProperty</span>(<span class="type">QObject</span> *<i>obj</i>, const <span class="type">QString</span> &amp;<i>name</i>, <span class="type"><a href="qqmlcontext.html">QQmlContext</a></span> *<i>ctxt</i>)</h3>
<p>Creates a <a href="qqmlproperty.html">QQmlProperty</a> for the property <i>name</i> of <i>obj</i> using the <a href="qqmlcontext.html">context</a> <i>ctxt</i>.</p>
<p>Creating a <a href="qqmlproperty.html">QQmlProperty</a> without a context will render some properties - like attached properties - inaccessible.</p>
<!-- @@@QQmlProperty -->
<!-- $$$QQmlProperty$$$QQmlPropertyQObject*constQString&QQmlEngine* -->
<h3 class="fn" id="QQmlProperty-6"><a name="QQmlProperty-6"></a>QQmlProperty::<span class="name">QQmlProperty</span>(<span class="type">QObject</span> *<i>obj</i>, const <span class="type">QString</span> &amp;<i>name</i>, <span class="type"><a href="qqmlengine.html">QQmlEngine</a></span> *<i>engine</i>)</h3>
<p>Creates a <a href="qqmlproperty.html">QQmlProperty</a> for the property <i>name</i> of <i>obj</i> using the environment for instantiating QML components that is provided by <i>engine</i>.</p>
<!-- @@@QQmlProperty -->
<!-- $$$QQmlProperty$$$QQmlPropertyconstQQmlProperty& -->
<h3 class="fn" id="QQmlProperty-7"><a name="QQmlProperty-7"></a>QQmlProperty::<span class="name">QQmlProperty</span>(const <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> &amp;<i>other</i>)</h3>
<p>Create a copy of <i>other</i>.</p>
<!-- @@@QQmlProperty -->
<!-- $$$connectNotifySignal[overload1]$$$connectNotifySignalQObject*constchar* -->
<h3 class="fn" id="connectNotifySignal"><a name="connectNotifySignal"></a><span class="type">bool</span> QQmlProperty::<span class="name">connectNotifySignal</span>(<span class="type">QObject</span> *<i>dest</i>, const <span class="type">char</span> *<i>slot</i>) const</h3>
<p>Connects the property's change notifier signal to the specified <i>slot</i> of the <i>dest</i> 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 <i>dest</i> object does not have the specified <i>slot</i>.</p>
<p><b>Note: </b><i>slot</i> should be passed using the SLOT() macro so it is correctly identified.</p><!-- @@@connectNotifySignal -->
<!-- $$$connectNotifySignal$$$connectNotifySignalQObject*int -->
<h3 class="fn" id="connectNotifySignal-1"><a name="connectNotifySignal-1"></a><span class="type">bool</span> QQmlProperty::<span class="name">connectNotifySignal</span>(<span class="type">QObject</span> *<i>dest</i>, <span class="type">int</span> <i>method</i>) const</h3>
<p>Connects the property's change notifier signal to the specified <i>method</i> of the <i>dest</i> 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 <i>dest</i> object does not have the specified <i>method</i>.</p>
<!-- @@@connectNotifySignal -->
<!-- $$$hasNotifySignal[overload1]$$$hasNotifySignal -->
<h3 class="fn" id="hasNotifySignal"><a name="hasNotifySignal"></a><span class="type">bool</span> QQmlProperty::<span class="name">hasNotifySignal</span>() const</h3>
<p>Returns true if the property has a change notifier signal, otherwise false.</p>
<!-- @@@hasNotifySignal -->
<!-- $$$index[overload1]$$$index -->
<h3 class="fn" id="index"><a name="index"></a><span class="type">int</span> QQmlProperty::<span class="name">index</span>() const</h3>
<p>Return the Qt metaobject index of the property.</p>
<!-- @@@index -->
<!-- $$$isDesignable[overload1]$$$isDesignable -->
<h3 class="fn" id="isDesignable"><a name="isDesignable"></a><span class="type">bool</span> QQmlProperty::<span class="name">isDesignable</span>() const</h3>
<p>Returns true if the property is designable, otherwise false.</p>
<!-- @@@isDesignable -->
<!-- $$$isProperty[overload1]$$$isProperty -->
<h3 class="fn" id="isProperty"><a name="isProperty"></a><span class="type">bool</span> QQmlProperty::<span class="name">isProperty</span>() const</h3>
<p>Returns true if this <a href="qqmlproperty.html">QQmlProperty</a> represents a regular Qt property.</p>
<!-- @@@isProperty -->
<!-- $$$isResettable[overload1]$$$isResettable -->
<h3 class="fn" id="isResettable"><a name="isResettable"></a><span class="type">bool</span> QQmlProperty::<span class="name">isResettable</span>() const</h3>
<p>Returns true if the property is resettable, otherwise false.</p>
<!-- @@@isResettable -->
<!-- $$$isSignalProperty[overload1]$$$isSignalProperty -->
<h3 class="fn" id="isSignalProperty"><a name="isSignalProperty"></a><span class="type">bool</span> QQmlProperty::<span class="name">isSignalProperty</span>() const</h3>
<p>Returns true if this <a href="qqmlproperty.html">QQmlProperty</a> represents a QML signal property.</p>
<!-- @@@isSignalProperty -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QQmlProperty::<span class="name">isValid</span>() const</h3>
<p>Returns true if the <a href="qqmlproperty.html">QQmlProperty</a> refers to a valid property, otherwise false.</p>
<!-- @@@isValid -->
<!-- $$$isWritable[overload1]$$$isWritable -->
<h3 class="fn" id="isWritable"><a name="isWritable"></a><span class="type">bool</span> QQmlProperty::<span class="name">isWritable</span>() const</h3>
<p>Returns true if the property is writable, otherwise false.</p>
<!-- @@@isWritable -->
<!-- $$$method[overload1]$$$method -->
<h3 class="fn" id="method"><a name="method"></a><span class="type">QMetaMethod</span> QQmlProperty::<span class="name">method</span>() const</h3>
<p>Return the QMetaMethod for this property if it is a <a href="qqmlproperty.html#Type-enum">SignalProperty</a>, otherwise returns an invalid QMetaMethod.</p>
<!-- @@@method -->
<!-- $$$name[overload1]$$$name -->
<h3 class="fn" id="name"><a name="name"></a><span class="type">QString</span> QQmlProperty::<span class="name">name</span>() const</h3>
<p>Return the name of this QML property.</p>
<!-- @@@name -->
<!-- $$$needsNotifySignal[overload1]$$$needsNotifySignal -->
<h3 class="fn" id="needsNotifySignal"><a name="needsNotifySignal"></a><span class="type">bool</span> QQmlProperty::<span class="name">needsNotifySignal</span>() const</h3>
<p>Returns true if the property needs a change notifier signal for bindings to remain upto date, false otherwise.</p>
<p>Some properties, such as attached properties or those whose value never changes, do not require a change notifier.</p>
<!-- @@@needsNotifySignal -->
<!-- $$$object[overload1]$$$object -->
<h3 class="fn" id="object"><a name="object"></a><span class="type">QObject</span> *QQmlProperty::<span class="name">object</span>() const</h3>
<p>Returns the <a href="qqmlproperty.html">QQmlProperty</a>'s QObject.</p>
<!-- @@@object -->
<!-- $$$property[overload1]$$$property -->
<h3 class="fn" id="property"><a name="property"></a><span class="type">QMetaProperty</span> QQmlProperty::<span class="name">property</span>() const</h3>
<p>Returns the Qt property associated with this QML property.</p>
<!-- @@@property -->
<!-- $$$propertyType[overload1]$$$propertyType -->
<h3 class="fn" id="propertyType"><a name="propertyType"></a><span class="type">int</span> QQmlProperty::<span class="name">propertyType</span>() const</h3>
<p>Returns the QVariant type of the property, or QVariant::Invalid if the property has no QVariant type.</p>
<!-- @@@propertyType -->
<!-- $$$propertyTypeCategory[overload1]$$$propertyTypeCategory -->
<h3 class="fn" id="propertyTypeCategory"><a name="propertyTypeCategory"></a><span class="type"><a href="qqmlproperty.html#PropertyTypeCategory-enum">PropertyTypeCategory</a></span> QQmlProperty::<span class="name">propertyTypeCategory</span>() const</h3>
<p>Returns the property category.</p>
<!-- @@@propertyTypeCategory -->
<!-- $$$propertyTypeName[overload1]$$$propertyTypeName -->
<h3 class="fn" id="propertyTypeName"><a name="propertyTypeName"></a>const <span class="type">char</span> *QQmlProperty::<span class="name">propertyTypeName</span>() const</h3>
<p>Returns the type name of the property, or 0 if the property has no type name.</p>
<!-- @@@propertyTypeName -->
<!-- $$$read[overload1]$$$read -->
<h3 class="fn" id="read"><a name="read"></a><span class="type">QVariant</span> QQmlProperty::<span class="name">read</span>() const</h3>
<p>Returns the property value.</p>
<!-- @@@read -->
<!-- $$$read$$$readconstQObject*constQString& -->
<h3 class="fn" id="read-1"><a name="read-1"></a><code>[static] </code><span class="type">QVariant</span> QQmlProperty::<span class="name">read</span>(const <span class="type">QObject</span> *<i>object</i>, const <span class="type">QString</span> &amp;<i>name</i>)</h3>
<p>Return the <i>name</i> property value of <i>object</i>. This method is equivalent to:</p>
<pre class="cpp">

  <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> p(object<span class="operator">,</span> name);
  p<span class="operator">.</span>read();

</pre>
<!-- @@@read -->
<!-- $$$read$$$readconstQObject*constQString&QQmlContext* -->
<h3 class="fn" id="read-2"><a name="read-2"></a><code>[static] </code><span class="type">QVariant</span> QQmlProperty::<span class="name">read</span>(const <span class="type">QObject</span> *<i>object</i>, const <span class="type">QString</span> &amp;<i>name</i>, <span class="type"><a href="qqmlcontext.html">QQmlContext</a></span> *<i>ctxt</i>)</h3>
<p>Return the <i>name</i> property value of <i>object</i> using the <a href="qqmlcontext.html">context</a> <i>ctxt</i>. This method is equivalent to:</p>
<pre class="cpp">

  <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> p(object<span class="operator">,</span> name<span class="operator">,</span> context);
  p<span class="operator">.</span>read();

</pre>
<!-- @@@read -->
<!-- $$$read$$$readconstQObject*constQString&QQmlEngine* -->
<h3 class="fn" id="read-3"><a name="read-3"></a><code>[static] </code><span class="type">QVariant</span> QQmlProperty::<span class="name">read</span>(const <span class="type">QObject</span> *<i>object</i>, const <span class="type">QString</span> &amp;<i>name</i>, <span class="type"><a href="qqmlengine.html">QQmlEngine</a></span> *<i>engine</i>)</h3>
<p>Return the <i>name</i> property value of <i>object</i> using the environment for instantiating QML components that is provided by <i>engine</i>. . This method is equivalent to:</p>
<pre class="cpp">

  <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> p(object<span class="operator">,</span> name<span class="operator">,</span> engine);
  p<span class="operator">.</span>read();

</pre>
<!-- @@@read -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn" id="reset"><a name="reset"></a><span class="type">bool</span> QQmlProperty::<span class="name">reset</span>() const</h3>
<p>Resets the property and returns true if the property is resettable. If the property is not resettable, nothing happens and false is returned.</p>
<!-- @@@reset -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn" id="type"><a name="type"></a><span class="type"><a href="qqmlproperty.html#Type-enum">Type</a></span> QQmlProperty::<span class="name">type</span>() const</h3>
<p>Returns the type of the property.</p>
<!-- @@@type -->
<!-- $$$write[overload1]$$$writeconstQVariant& -->
<h3 class="fn" id="write"><a name="write"></a><span class="type">bool</span> QQmlProperty::<span class="name">write</span>(const <span class="type">QVariant</span> &amp;<i>value</i>) const</h3>
<p>Sets the property value to <i>value</i>. Returns <code>true</code> on success, or <code>false</code> if the property can't be set because the <i>value</i> is the wrong type, for example.</p>
<!-- @@@write -->
<!-- $$$write$$$writeQObject*constQString&constQVariant& -->
<h3 class="fn" id="write-1"><a name="write-1"></a><code>[static] </code><span class="type">bool</span> QQmlProperty::<span class="name">write</span>(<span class="type">QObject</span> *<i>object</i>, const <span class="type">QString</span> &amp;<i>name</i>, const <span class="type">QVariant</span> &amp;<i>value</i>)</h3>
<p>Writes <i>value</i> to the <i>name</i> property of <i>object</i>. This method is equivalent to:</p>
<pre class="cpp">

  <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> p(object<span class="operator">,</span> name);
  p<span class="operator">.</span>write(value);

</pre>
<p>Returns <code>true</code> on success, <code>false</code> otherwise.</p>
<!-- @@@write -->
<!-- $$$write$$$writeQObject*constQString&constQVariant&QQmlContext* -->
<h3 class="fn" id="write-2"><a name="write-2"></a><code>[static] </code><span class="type">bool</span> QQmlProperty::<span class="name">write</span>(<span class="type">QObject</span> *<i>object</i>, const <span class="type">QString</span> &amp;<i>name</i>, const <span class="type">QVariant</span> &amp;<i>value</i>, <span class="type"><a href="qqmlcontext.html">QQmlContext</a></span> *<i>ctxt</i>)</h3>
<p>Writes <i>value</i> to the <i>name</i> property of <i>object</i> using the <a href="qqmlcontext.html">context</a> <i>ctxt</i>. This method is equivalent to:</p>
<pre class="cpp">

  <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> p(object<span class="operator">,</span> name<span class="operator">,</span> ctxt);
  p<span class="operator">.</span>write(value);

</pre>
<p>Returns <code>true</code> on success, <code>false</code> otherwise.</p>
<!-- @@@write -->
<!-- $$$write$$$writeQObject*constQString&constQVariant&QQmlEngine* -->
<h3 class="fn" id="write-3"><a name="write-3"></a><code>[static] </code><span class="type">bool</span> QQmlProperty::<span class="name">write</span>(<span class="type">QObject</span> *<i>object</i>, const <span class="type">QString</span> &amp;<i>name</i>, const <span class="type">QVariant</span> &amp;<i>value</i>, <span class="type"><a href="qqmlengine.html">QQmlEngine</a></span> *<i>engine</i>)</h3>
<p>Writes <i>value</i> to the <i>name</i> property of <i>object</i> using the environment for instantiating QML components that is provided by <i>engine</i>. This method is equivalent to:</p>
<pre class="cpp">

  <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> p(object<span class="operator">,</span> name<span class="operator">,</span> engine);
  p<span class="operator">.</span>write(value);

</pre>
<p>Returns <code>true</code> on success, <code>false</code> otherwise.</p>
<!-- @@@write -->
<!-- $$$operator=[overload1]$$$operator=constQQmlProperty& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> &amp;QQmlProperty::<span class="name">operator=</span>(const <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> &amp;<i>other</i>)</h3>
<p>Assign <i>other</i> to this <a href="qqmlproperty.html">QQmlProperty</a>.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQQmlProperty& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QQmlProperty::<span class="name">operator==</span>(const <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> &amp;<i>other</i>) const</h3>
<p>Returns true if <i>other</i> and this <a href="qqmlproperty.html">QQmlProperty</a> represent the same property.</p>
<!-- @@@operator== -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>