On 2014-02-26 11:48, antonio.cano.go...@ovi.com wrote:
I tried this:

        QGuiApplication *app = SailfishApp::application(argc, argv);
        QQuickView *view = SailfishApp::createView();
        Bloomfilters  * bloomfilters = new Bloomfilters();
view->setSource(SailfishApp::pathTo("qml/bloomfilter.qml"));
        view->showFullScreen();
view->rootContext()->setContextProperty("Bloomfilters", bloomfilters);
        return app->exec();

But it is not working yet.

Two things:

1. Call setContextProperty() right before before setSource(), so it's already available when the QML content is loaded. 2. Use lowercase for context property names ("bloomfilters" instead of "Bloomfilters"). In some places, QML interprets IDs starting with an upper case letter as a type name, and that won't work then, therefore stick to lowercase.


HTH :)
Thomas
_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to