<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">I find it easier the other way ;-)</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">whereever it is possible, I'm using
      QObject* for my data <br>
    </div>
    <div class="moz-cite-prefix">there's a special C++ DataManager class
      with Q_INVOKABLE methods to create / delete / .... and this class
      always is the parent of my QObject*</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">it's cool - there's no by-value copying
      between C++ and QML and I'm getting code-completion in QML on all
      the Q_PROPERTY and I'm always using the same objects,</div>
    <div class="moz-cite-prefix">so it's easy to call a C++ utility
      using the QObject* or exposing the QObject* to QML</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">the nice thing: my datamodel is defined
      using a custom DSL based on (Eclipse) XText and XTend and all the
      C++ code for my Entities and the DataManager is generated from
      this model.</div>
    <div class="moz-cite-prefix">hopefully some day I'll find the time
      to publish this generator as OpenSource</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">ekke<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Am 01.03.19 um 16:12 schrieb Jason H:<br>
    </div>
    <blockquote type="cite"
cite="mid:trinity-7cd8847b-0510-4f41-beb7-97857264486d-1551453170519@3c-app-mailcom-bs03">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div style="font-family: Verdana;font-size: 12.0px;">
        <div>Check
          out qtmultimedia/examples/multimedia/video/qmlvideofilter_opencl
          fo the filter result types. I think that's what you want?</div>
        <div> </div>
        <div>I find it easier to code and work with to just rely on
          QVariant conversion. QVariantList and QVariantMap are
          transparently converted to JS Objects. </div>
        <div> 
          <div name="quote" style="margin:10px 5px 5px 10px; padding:
            10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap:
            break-word; -webkit-nbsp-mode: space; -webkit-line-break:
            after-white-space;">
            <div style="margin:0 0 10px 0;"><b>Sent:</b> Friday, March
              01, 2019 at 6:43 AM<br>
              <b>From:</b> "Sylvain Pointeau"
              <a class="moz-txt-link-rfc2396E" href="mailto:sylvain.pointeau@gmail.com"><sylvain.pointeau@gmail.com></a><br>
              <b>To:</b> "Qt Project" <a class="moz-txt-link-rfc2396E" href="mailto:interest@qt-project.org"><interest@qt-project.org></a><br>
              <b>Subject:</b> [Interest] using a custom class as
              parameter of signal/slot, used in QML</div>
            <div name="quoted-content">
              <div>
                <div>
                  <div>Dear all,</div>
                  <div> </div>
                  <div>I understood how to use a struct / simple class
                    as a parameter of a signal / slot, and it works well
                    by value.</div>
                  <div> </div>
                  <div>However as soon as we have to declare the type
                    for QML, it is not good anymore.</div>
                  <div>It seems that it must be derived from QObject and
                    passed by pointer.</div>
                  <div> </div>
                  <div>
                    <div style="background: none;font: 400 13.33px /
                      19.99px Arial , Helvetica , sans-serif;border:
                      0.0px rgb(34,34,34);width: 1596.0px;text-align:
                      left;color: rgb(34,34,34);text-transform:
                      none;text-indent: 0.0px;letter-spacing:
                      normal;overflow: visible;text-decoration:
                      none;word-spacing: 0.0px;white-space:
                      normal;font-size-adjust: none;font-stretch:
                      normal;">
                      <div>Do I understand well that the QML world does
                        only accept pointers on QObject?</div>
                      <div> </div>
                    </div>
                  </div>
                  <div>However I don't understand, who owns the pointer
                    of the custom class (derived from QObject) and who
                    actually deletes it?</div>
                  <div>(I tried a sharepointer but QML does not know how
                    to handle it)</div>
                  <div> </div>
                  <div>Do you have any idea?</div>
                  <div> </div>
                  <div>Best regards,</div>
                  <div>Sylvain</div>
                  <div> </div>
                  <div> </div>
                </div>
              </div>
              _______________________________________________ Interest
              mailing list <a class="moz-txt-link-abbreviated" href="mailto:Interest@qt-project.org">Interest@qt-project.org</a> <a
                href="https://lists.qt-project.org/listinfo/interest"
                target="_blank" moz-do-not-send="true">https://lists.qt-project.org/listinfo/interest</a></div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Interest mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Interest@qt-project.org">Interest@qt-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.qt-project.org/listinfo/interest">https://lists.qt-project.org/listinfo/interest</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>