C++ Singleton import inside Qt Creator's QML Designer
Unsolved
QML and Qt Quick
-
Hello, I have a C++ singleton registered for qml using such code:
engine.setObjectOwnership( wrapper, QQmlEngine::CppOwnership ); qmlRegisterSingletonType<QMLWrapper>( "QMLWrapper", 1, 0, "QMLWrapper", getWrapper );
In QML I import it using plain import and use as is stated below:
import QMLWrapper 1.0 ... QMLWrapper.onLoginButtonClicked("login", "pass")
But when I try to enter Form Editor inside Qt Creator, I get error:
So, is there any way to keep Form Editor working without commenting
import
statement?I use Visual Studio + Qt Plugin to build an application, Qt Creator is used only for editing QMLs
Thanks