Reputation: 11732
I registered a C++ type as a QML singleton object via qmlRegisterSingletonType
. Then I tried importing this QML singleton into JS via:
.import FileIO 1.0 as FileIO
...and got a "Syntax error" message at runtime.
Any solution?
Upvotes: 2
Views: 328
Reputation: 11732
The problem was that I had some (non-comment) code before the .import
. Moving the import before that code fixed it.
Upvotes: 2