[SailfishDevel] How to use setContext() or what is recommended?!

2013-11-13 Thread Gabriel Boehme
Hi sailors, in the very first (Qt4 version) of the SDK I ported an easy application, that is using a list model. To connect the list model and also my main logic stuff I used the setContextProperty() method. In the first Qt5 SDK version I had to work a bit around that (created a view from

Re: [SailfishDevel] How to use setContext() or what is recommended?!

2013-11-13 Thread Jonni Rainisto
Hi, Yes your setContextProperty() to rootContext is the right approach. Usually I do something like this: QScopedPointerQGuiApplication app(Sailfish::createApplication(argc, argv)); QScopedPointerQQuickView view(Sailfish::createView()); MyClass data;

Re: [SailfishDevel] How to use setContext() or what is recommended?!

2013-11-13 Thread Gabriel Boehme
Wow, thanks to you and also Andrey! This is nearly the way I took back in the first Jolla Qt5 SDK, is it also the recommended way to do that? Will it have a (bad) influence on the start up times? Thanks so much! :) Hi, Yes your setContextProperty() to rootContext is the right approach.

Re: [SailfishDevel] How to use setContext() or what is recommended?!

2013-11-13 Thread Andrey Kozhevnikov
This is almost same what SailfishApp::main() does for you and it keeping booster working, just lets you to use application and view instances directly. Have fun with Sailfish ;) On 13.11.2013 21:23, Gabriel Boehme wrote: Wow, thanks to you and also Andrey! This is nearly the way I took back