<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 12/12/2013 02:39 PM, Robin Burchell
      wrote:<br>
    </div>
    <blockquote
      cite="mid:2C367E0B-8227-4710-991C-08A6F9462573@jolla.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div>
        <div>On 12 Dec 2013, at 14:28, Wim de Vries <<a
            moz-do-not-send="true" 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 moz-do-not-send="true"
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.<br>
      </div>
    </blockquote>
    Why is the Qt preferred way deprecated in Sailfish?<br>
    <pre class="cpp"><span class="type"><a href="http://qt-project.org/doc/qt-5.0/qtqml/qqmlproperty.html">QQmlProperty</a></span><span class="operator">::</span>write(object<span class="operator">,</span> <span class="string">"someNumber"</span><span class="operator">,</span> <span class="number">5000</span>)</pre>
    <br>
    So much simpler and understandable.<br>
     <br>
    <br>
    <br>
    <blockquote
      cite="mid:2C367E0B-8227-4710-991C-08A6F9462573@jolla.com"
      type="cite">
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
    </blockquote>
    <br>
  </body>
</html>