<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div>
<div>On 12 Dec 2013, at 14:28, Wim de Vries <<a href="mailto:wsvries@xs4all.nl">wsvries@xs4all.nl</a>> wrote:</div>
<blockquote type="cite">
<div text="#000000" bgcolor="#FFFFFF">
<blockquote cite="mid:48602A37-F526-4E37-8585-6313FEA7BB21@jolla.com" type="cite">
<div>
<blockquote type="cite">
<div text="#000000" bgcolor="#FFFFFF">I need to set many properties in QML elements from within C++.<br>
</div>
</blockquote>
<div><br>
</div>
You may find it easier to expose these properties *from* C++ to QML, using a singleton type (for example)</div>
<div><br>
</div>
<div><a moz-do-not-send="true" href="http://qt-project.org/doc/qt-5.0/qtqml/qtqml-cppintegration-definetypes.html#registering-singleton-objects-with-a-singleton-type">http://qt-project.org/doc/qt-5.0/qtqml/qtqml-cppintegration-definetypes.html#registering-singleton-objects-with-a-singleton-type</a></div>
<div><br>
</div>
</blockquote>
Yes, I have to control many property values. <br>
</div>
</blockquote>
<div><br>
</div>
I’m not sure how that matters.. see: <a href="http://qt-project.org/doc/qt-5.0/qtqml/qqmlengine.html#qmlRegisterSingletonType-2">
http://qt-project.org/doc/qt-5.0/qtqml/qqmlengine.html#qmlRegisterSingletonType-2</a></div>
<div><br>
</div>
<div>You can register your object instance as a singleton, exposing as many properties/methods as you like - there’s no limitations and it’s fairly easily done</div>
<div><br>
</div>
<div>Theme properties in Silica are exposed through a singleton, for example.</div>
</body>
</html>