Salut Lucien
Maybe it is clearer with Code examples
I was doing this, which gives me an error, but seems to work!
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer
app(Sailfish::createApplication(argc, argv));
QScopedPointer view(Sailfish::createView("main.qml"));
v
Hello guys !
It might be useful to use qmlRegister**Type (uncreatable, singleton etc.) to
expose C++ components to QML. But if you really want to use rootContext()-
>setContextProperty, you have to be cautious.
Actually, if you pass the qml file to the view before registering C++
components, th
Hi Martin
Curiouser and Curiouser!
Just to be sure, I went back and tested your suggestion in a demo
project based on the default "Hello Sailors" new project template.
Here I pass the c++ property cppproperty with the value "Hello World".
In the QML FirstPage this is concatenated to the "H
Also, there is
qt-project.org/doc/qt-5.0/qtqml/qqmlengine.html#qmlRegisterSingletonType
On Aug 4, 2013 3:31 PM, "Martin Grimme" wrote:
> Hi,
>
> you don't want to set the context property on the
> QmlApplicationViewer, which was dead Nokia code to target Symbian and
> Harmattan, anyway.
> QmlApp
Hi,
you don't want to set the context property on the
QmlApplicationViewer, which was dead Nokia code to target Symbian and
Harmattan, anyway.
QmlApplicationViewer was derived from QmlView, where it got the
rootContext() method from.
With Qt5, QmlView was renamed to QQuickView. And when using the
Hi all
What is the recommended way to pass simple c++ properties from the
main.cpp to the QML part of a project using the Qt 5 Alpha?
In the good old days of the first Alpha, I used to do this Harmattan
style using
QmlApplicationViewer viewer;
viewer.rootContext()->setContextPrope