[Qt-qml] Static analysis for QML
Gregory Schlomoff
gregory.schlomoff at gmail.com
Wed Nov 24 14:01:55 CET 2010
> In fact, for types defined in a QML plugin, Creator will often already be able
> to offer code completion and error reporting. What the static analysis can't do
> yet is get the types right when you embed QML in a C++ application and expose
> some random objects (say using setContextProperty).
>
> It's under investigation though.
>
That's good news! Hope to see that soon in Qt Creator.
For the record, I'm creating a custom QML type (ie: a QDeclarativeItem
subclass), exposed through:
qmlRegisterType<MyClass>("MyCustomClasses", 1, 0, "MyClass");
So this seems an intermediary case between QML plugins and random
qobjects exposed through context properties.
But Qt Creator really isn't happy with that, to the point that it will
underline in red the:
import MyCustomClasses 1.0
statement at the top of my qml files. And of course I won't get any
form of completion or code assistance for those custom types. I hope
that this issue is also being considered by the Qt Creator team,
because it doesn't seem very far from qml plugins.
Thanks
greg
More information about the Qt-qml
mailing list