Subclass of QQuickItem in a namespace
-
The following documentation explains how to create in C++ sub-classes of QQuickItem so that they can be instantiated in qml files.
https://doc.qt.io/qt-6/qtqml-tutorials-extending-qml-example.htmlIn the example given there, the example class PieChart is not under any namespace (i.e., it is in global namespace).
I want to do the following:namespace myNameSpace
{
class myChart : public QQuickPaintedItem
{
....
}}
How do I instantiate myChart in qml file? I tried the following, but, that gives syntax error at "::".
myNameSpace::myChart {
....
}