how to use a class written in javascript to qml ?
-
"var"
-
"Component is not ready" suggests that it takes time for your component to load. You need to wait until it finishes loading, before assigning it to a variable.
Do the assignment inside the Component.onCompleted() signal handler. See:
-
The 'var' property type is only available in QtQuick 2.0, not in QtQuick 1.0. (Well, technically, in QtQml 2.0, but yeah.)
Cheers,
Chris. -
[quote author="chrisadams" date="1387157603"]The 'var' property type is only available in QtQuick 2.0, not in QtQuick 1.0. (Well, technically, in QtQml 2.0, but yeah.)[/quote]Ah, good catch.
september, are you able to upgrade to Qt Quick 2? Qt Quick 1 is obsolete now.