/usr/share/qt5/doc/qtqml/qqmlproperty.html is in qtdeclarative5-doc-html 5.9.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | <?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.5 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 <QQmlProperty></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 &<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 &<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 &<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 &<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 &<i>value</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQmlProperty &</td><td class="memItemRight bottomAlign"><b><a href="qqmlproperty.html#operator-eq">operator=</a></b>(const QQmlProperty &<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 &<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 &<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 &<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 &<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 &<i>name</i>, const QVariant &<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 &<i>name</i>, const QVariant &<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 &<i>name</i>, const QVariant &<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 <a href="../qtcore/qmetaobject.html">QMetaObject</a> 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 <a href="../qtcore/qmetaproperty.html">QMetaProperty</a> 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">"A bit of text"</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 <QQmlProperty></span>
<span class="preprocessor">#include <QGraphicsObject></span>
<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
<span class="type">QQuickView</span> view(<span class="type"><a href="../qtcore/qurl.html">QUrl</a></span><span class="operator">::</span>fromLocalFile(<span class="string">"MyItem.qml"</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">"font.pixelSize"</span>);
<a href="../qtcore/qtglobal.html#qWarning">qWarning</a>() <span class="operator"><</span><span class="operator"><</span> <span class="string">"Current pixel size:"</span> <span class="operator"><</span><span class="operator"><</span> property<span class="operator">.</span>read()<span class="operator">.</span>toInt();
property<span class="operator">.</span>write(<span class="number">24</span>);
<a href="../qtcore/qtglobal.html#qWarning">qWarning</a>() <span class="operator"><</span><span class="operator"><</span> <span class="string">"Pixel size should now be 24:"</span> <span class="operator"><</span><span class="operator"><</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 <a href="../qtcore/qobject.html">QObject</a> 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"><a href="../qtcore/qobject.html">QObject</a></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"><a href="../qtcore/qobject.html">QObject</a></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"><a href="../qtcore/qobject.html">QObject</a></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"><a href="../qtcore/qobject.html">QObject</a></span> *<i>obj</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<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"><a href="../qtcore/qobject.html">QObject</a></span> *<i>obj</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<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"><a href="../qtcore/qobject.html">QObject</a></span> *<i>obj</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<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> &<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"><a href="../qtcore/qobject.html">QObject</a></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"><a href="../qtcore/qobject.html">QObject</a></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"><a href="../qtcore/qmetamethod.html">QMetaMethod</a></span> QQmlProperty::<span class="name">method</span>() const</h3>
<p>Return the <a href="../qtcore/qmetamethod.html">QMetaMethod</a> for this property if it is a <a href="qqmlproperty.html#Type-enum">SignalProperty</a>, otherwise returns an invalid <a href="../qtcore/qmetamethod.html">QMetaMethod</a>.</p>
<!-- @@@method -->
<!-- $$$name[overload1]$$$name -->
<h3 class="fn" id="name"><a name="name"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></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"><a href="../qtcore/qobject.html">QObject</a></span> *QQmlProperty::<span class="name">object</span>() const</h3>
<p>Returns the <a href="qqmlproperty.html">QQmlProperty</a>'s <a href="../qtcore/qobject.html">QObject</a>.</p>
<!-- @@@object -->
<!-- $$$property[overload1]$$$property -->
<h3 class="fn" id="property"><a name="property"></a><span class="type"><a href="../qtcore/qmetaproperty.html">QMetaProperty</a></span> QQmlProperty::<span class="name">property</span>() const</h3>
<p>Returns the <a href="../qtcore/qmetaproperty.html">Qt property</a> 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 <a href="../qtcore/qvariant.html">QVariant</a> type of the property, or QVariant::Invalid if the property has no <a href="../qtcore/qvariant.html">QVariant</a> 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"><a href="../qtcore/qvariant.html">QVariant</a></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"><a href="../qtcore/qvariant.html">QVariant</a></span> QQmlProperty::<span class="name">read</span>(const <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *<i>object</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<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"><a href="../qtcore/qvariant.html">QVariant</a></span> QQmlProperty::<span class="name">read</span>(const <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *<i>object</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<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"><a href="../qtcore/qvariant.html">QVariant</a></span> QQmlProperty::<span class="name">read</span>(const <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> *<i>object</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<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"><a href="../qtcore/qvariant.html">QVariant</a></span> &<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"><a href="../qtcore/qobject.html">QObject</a></span> *<i>object</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>name</i>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &<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"><a href="../qtcore/qobject.html">QObject</a></span> *<i>object</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>name</i>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &<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"><a href="../qtcore/qobject.html">QObject</a></span> *<i>object</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &<i>name</i>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &<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> &QQmlProperty::<span class="name">operator=</span>(const <span class="type"><a href="qqmlproperty.html#QQmlProperty">QQmlProperty</a></span> &<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> &<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">©</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>
|