Since you are passing the parent as Tab_view, it should be children of the tabview only. It will be in the current context itself. Here is the sample which I tried and it works perfectly.
I suspect that either object is not created or you are not iterating the correct object. Try with following code snippet. It should work
QQuickView view;
view.setSource(QUrl(QStringLiteral("qrc:///main.qml")));
view.show();
QQuickItem *item = view->rootObject();
QQuickItem *obj = qobject_cast<QQuickItem *>(item->findChild<QQuickItem*>("myObj"));
if (obj)
qDebug() << "My name is ="<<obj->objectName();
↧