[SailfishDevel] Mainloop problem
Mikael Hermansson
mike at 7b4.se
Sun Dec 22 15:22:36 UTC 2013
Cant figure out what I am doing wrong but it seems mainloop does not shutdown when
using QQuickView like below.
And I can't figure out what signal I should conect to? Or more exact what signal is sent from
sailfish when app is closed?
AFAIK SailfishApp is just a subclass of QQuickView but there is no public API what signals it
implements/overrides?
[code]
QGuiApplication *app = SailfishApp::application(argc, argv);
UDPManager *udp = new UDPManager();
QQuickView *view = SailfishApp::createView();
/* FIXME: THIS DOES NOT WORK */
QObject::connect(view, SIGNAL(destroyed()), view, SLOT(QGuiApplication::quit()));
view->rootContext()->setContextProperty("version", QString(VERSION));
view->rootContext()->setContextProperty("udp", udp);
view->setSource(QString("/usr/share/harbour-push2sail/qml/push2sail.qml"));
view->showFullScreen();
app->exec();
delete app;
delete udp;
[/code]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20131222/bdc5fca2/attachment.html>
More information about the Devel
mailing list