I want to try out rootContext()->setContextProperties() instead of rootContext()->setContextProperty() because I read it is more efficient to bundle the properties instead of setting them X-times by yourself. Unfortunately I cannot find any good ressource on how to use it.
So e.g. in the main.cpp I have
ClassA a;
ClassB b;
Normally I would go for
engine.rootContext()->setContextProperty(&a, "classA");
engine.rootContext()->setContextProperty(&b, "classB");
So how can you syntactically correct sum this up and form it into a QVector<QQmlContext::PropertyPair>? The docs are really bare for this one.
A small example would be appreciated. Thanks!