summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PySide/QtDeclarative/typesystem_declarative.xml15
1 files changed, 14 insertions, 1 deletions
diff --git a/PySide/QtDeclarative/typesystem_declarative.xml b/PySide/QtDeclarative/typesystem_declarative.xml
index e754006..7343a4b 100644
--- a/PySide/QtDeclarative/typesystem_declarative.xml
+++ b/PySide/QtDeclarative/typesystem_declarative.xml
@@ -127,7 +127,20 @@
<enum-type name="Type" />
</value-type>
- <object-type name="QDeclarativePropertyMap" />
+ <object-type name="QDeclarativePropertyMap">
+ <modify-documentation xpath="description/code[1]">&lt;code># create our data
+ownerData = QDeclarativePropertyMap()
+ownerData.insert(&quot;name&quot;, &quot;John Smith&quot;)
+ownerData.insert(&quot;phone&quot;, &quot;555-5555&quot;)
+
+# expose it to the UI layer
+view = QDeclarativeView()
+ctxt = view.rootContext()
+ctxt.setContextProperty(&quot;owner&quot;, ownerData)
+
+view.setSource(QUrl.fromLocalFile(&quot;main.qml&quot;))
+view.show()&lt;/code></modify-documentation>
+ </object-type>
<object-type name="QDeclarativePropertyValueSource" />
<value-type name="QDeclarativeScriptString" />
<object-type name="QDeclarativeView">