Re: [SailfishDevel] Keeping my app cover in task manager at all times. Possible?

2013-12-12 Thread AL13N
I had been thinking on this... it might be useful for a user to pin a app (cover) into place, it should always be the same place, for easy remembrance and preferably on reboot it would start automagically (and as a result also restart when you stop it) something for a pulley menu or a long press m

Re: [SailfishDevel] best way to set QML properties from within C++ in Sailfish?

2013-12-12 Thread Wim de Vries
On 12/12/2013 02:39 PM, Robin Burchell wrote: On 12 Dec 2013, at 14:28, Wim de Vries > wrote: I need to set many properties in QML elements from within C++. You may find it easier to expose these properties *from* C++ to QML, using a singleton type (for example) htt

Re: [SailfishDevel] Closing an application without killing the main loop

2013-12-12 Thread Ville Ranki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2013-12-12 15:29, Mikko Harju wrote: > On 11.12.2013 22:51, Ville Ranki wrote: > >> I have not found a way to do it in Sailfish. When user closes >> the application, Sailfish terminates the Qt main loop which >> effectively makes it impossible to d

Re: [SailfishDevel] C++ and QML Integration: SetContextProperty with the latest SailfishOS Templates

2013-12-12 Thread christopher . lamb
Hi Wim Thanks, that works! (except that you probably did not mean "view" to be 2nd param of setContextProperty). So taking your example I can do: int main(int argc, char *argv[]) { bool cppproperty = true; QGuiApplication *app = SailfishApp::application(argc, argv); QQuickView *

Re: [SailfishDevel] best way to set QML properties from within C++ in Sailfish?

2013-12-12 Thread Wim de Vries
On 12/12/2013 02:28 PM, Wim de Vries wrote: Thanks. On 12/12/2013 01:44 PM, Robin Burchell wrote: On 12 Dec 2013, at 13:42, Wim de Vries > wrote: I need to set many properties in QML elements from within C++. You may find it easier to expose these properties *from* C

Re: [SailfishDevel] best way to set QML properties from within C++ in Sailfish?

2013-12-12 Thread Robin Burchell
On 12 Dec 2013, at 14:28, Wim de Vries mailto:wsvr...@xs4all.nl>> wrote: I need to set many properties in QML elements from within C++. You may find it easier to expose these properties *from* C++ to QML, using a singleton type (for example) http://qt-project.org/doc/qt-5.0/qtqml/qtqml-cppinteg

Re: [SailfishDevel] C++ and QML Integration: SetContextProperty with the latest SailfishOS Templates

2013-12-12 Thread Wim de Vries
Hi Cristopher, I got this answer some time ago: QGuiApplication *app = SailfishApp::application(argc, argv); QQuickView *view = SailfishApp::createView(); view->rootContext()->setContextProperty("cppproperty", view); view->setSource(SailfishApp::pathTo("qml/main.qml")); view->show

Re: [SailfishDevel] Closing an application without killing the main loop

2013-12-12 Thread Mikko Harju
On 11.12.2013 22:51, Ville Ranki wrote: > I have not found a way to do it in Sailfish. When user closes the > application, Sailfish terminates the Qt main loop which effectively > makes it impossible to do any asynchronous tasks. Have you ran it on the actual device? It might be that the fix did

Re: [SailfishDevel] best way to set QML properties from within C++ in Sailfish?

2013-12-12 Thread Wim de Vries
Thanks. On 12/12/2013 01:44 PM, Robin Burchell wrote: On 12 Dec 2013, at 13:42, Wim de Vries > wrote: I need to set many properties in QML elements from within C++. You may find it easier to expose these properties *from* C++ to QML, using a singleton type (for examp

[SailfishDevel] C++ and QML Integration: SetContextProperty with the latest SailfishOS Templates

2013-12-12 Thread christopher . lamb
Hi All what is now the recommended way to SetContextProperty in the main function using the latest Sailfish application templates (from thp)? The default main now looks like: #include int main(int argc, char *argv[]) { return SailfishApp::main(argc, argv); } In the days of the old te

Re: [SailfishDevel] best way to set QML properties from within C++ in Sailfish?

2013-12-12 Thread Robin Burchell
On 12 Dec 2013, at 13:42, Wim de Vries mailto:wsvr...@xs4all.nl>> wrote: I need to set many properties in QML elements from within C++. You may find it easier to expose these properties *from* C++ to QML, using a singleton type (for example) http://qt-project.org/doc/qt-5.0/qtqml/qtqml-cppinteg

[SailfishDevel] best way to set QML properties from within C++ in Sailfish?

2013-12-12 Thread Wim de Vries
Hi, I need to set many properties in QML elements from within C++. QT documentation: QQmlEngine engine; QQmlComponent component(&engine, "MyItem.qml"); QObject

Re: [SailfishDevel] Closing an application without killing the main loop

2013-12-12 Thread Lucien XU
Hello, I don't know what's the best way to do it, but here are some ideas. 1. Use aboutToQuit and block it with a QEventLoop ? It might not be enough and might leave the application cover open on the multitask grid, making it look not responding. 2. Launch a script / program when quitting