Using namespace in QML
-
Hi all, Anybody know how to do this ?
I have a class which is derived from QQuickPaintedItem, which i used in my QML side for my custom drawing. Say MyGraphicScene.
and i have another class say BaseShape which is derived from QObject, and have a 'has a' relation ship with my MyGraphicScene class.
I my case all these class are under the namesapce called MyyApp::MyGraphicAppnamespace MyyApp
{
namesapce MyGraphicApp
{
class MyGraphicScene: public QQuickPaintedItem
{......
BaseShape* pShape;
};
}
}so when i compile this, its fine, but during runtime, my plugin library could not be loaded beacuse of the undefined symbol error, when i remove the name space, everything works fine...
Can anybody tell me why namespace is not recognize in QML, any solution please, I should go with name space anyway, -
@Praveen-kk said:
BaseShape
I have registerd both BaseShape and MyGraphicScene class using qmlRegisterType<>()
Only problem when using the name space.