<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 12/22/2013 06:03 PM, Wim de Vries
      wrote:<br>
    </div>
    <blockquote cite="mid:52B71B52.4070309@xs4all.nl" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Not sure if correct, but I use
        view->close() (through a QML2C++ call) and all ends.<br>
        In your case possibly:<br>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;"> QObject::connect(view,
          SIGNAL(destroyed()), view,</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;"> SLOT(close()));<br>
        </p>
      </div>
    </blockquote>
    Just found out: the above works on the emulator; not on Jolla.<br>
    <br>
    <blockquote cite="mid:52B71B52.4070309@xs4all.nl" type="cite">
      <div class="moz-cite-prefix"> <br>
        On 12/22/2013 05:45 PM, Mikael Hermansson wrote:<br>
      </div>
      <blockquote cite="mid:3633449.gyWKuahj7r@thinkpad-x230"
        type="cite">
        <meta name="qrichtext" content="1">
        <style type="text/css">
p, li { white-space: pre-wrap; }
</style>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">Changed to:</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;"><span style=" color:#c0c0c0;"> </span><span
            style=" color:#800080;">QObject</span><span style="
            color:#000000;">::connect(app,</span><span style="
            color:#c0c0c0;"> </span><span style=" color:#808000;">SIGNAL</span><span
            style=" color:#000000;">(</span>lastWindowClosed<span
            style=" color:#000000;">()),</span><span style="
            color:#c0c0c0;"> </span><span style=" color:#000000;">app,</span><span
            style=" color:#c0c0c0;"> </span><span style="
            color:#808000;">SLOT</span><span style=" color:#000000;">(</span>quit<span
            style=" color:#000000;">()));</span></p>
        <p style="-qt-paragraph-type:empty; margin-top:0px;
          margin-bottom:0px; margin-left:0px; margin-right:0px;
          -qt-block-indent:0; text-indent:0px; "> </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;"><span style=" font-family:'Courier
            New,courier';">still it does not leave mainloop</span></p>
        <p style="-qt-paragraph-type:empty; margin-top:0px;
          margin-bottom:0px; margin-left:0px; margin-right:0px;
          -qt-block-indent:0; text-indent:0px; "> </p>
        <p style="-qt-paragraph-type:empty; margin-top:0px;
          margin-bottom:0px; margin-left:0px; margin-right:0px;
          -qt-block-indent:0; text-indent:0px; "> </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">On Sunday 22 December 2013 21.36.47 Andrey
          Kozhevnikov wrote:</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> use lastWindowClosed signal instead of
          destroyed</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> and</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> int retval = app->exec();</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> delete x;</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> delete y;</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> return retval;</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> On 22.12.2013 21:22, Mikael Hermansson
          wrote:</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > Cant figure out what I am doing
          wrong but it seems mainloop does not</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > shutdown when using QQuickView
          like below.</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > And I can't figure out what
          signal I should conect to? Or more exact what</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > signal is sent from sailfish when
          app is closed?</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > AFAIK SailfishApp is just a
          subclass of QQuickView but there is no public</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > API what signals it
          implements/overrides?</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > [code]</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > QGuiApplication *app =
          SailfishApp::application(argc, argv);</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > UDPManager *udp = new
          UDPManager();</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > QQuickView *view =
          SailfishApp::createView();</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > /* FIXME: THIS DOES NOT WORK */</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > QObject::connect(view,
          SIGNAL(destroyed()), view,</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > SLOT(QGuiApplication::quit()));</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> >
          view->rootContext()->setContextProperty("version",
          QString(VERSION));</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> >
          view->rootContext()->setContextProperty("udp", udp);</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> >
          view->setSource(QString("/usr/share/harbour-push2sail/qml/push2sail.q</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > ml"));</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > view->showFullScreen();</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > app->exec();</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > delete app;</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > delete udp;</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > [/code]</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > </p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> >
          _______________________________________________</p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;
          -qt-user-state:0;">> > SailfishOS.org Devel mailing list</p>
        <p style="-qt-paragraph-type:empty; margin-top:0px;
          margin-bottom:0px; margin-left:0px; margin-right:0px;
          -qt-block-indent:0; text-indent:0px; "> </p>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
    </blockquote>
    <br>
  </body>
</html>