Qt 6.11 is out! See what's new in the release
blog
How to find a child item of qquickwidget
-
A qml file is loaded into qquickwidget and can be displayed in a qwidget layout. I need to find a child item inside the qml file and use it in the code . I set object name to the item in the qml file. But qquickwidget-> findChild< QObject * > ( objectName ) returns nullptr. What is wrong?
If I have pure qml layout, there is no problem to find this item from root window.
-
A qml file is loaded into qquickwidget and can be displayed in a qwidget layout. I need to find a child item inside the qml file and use it in the code . I set object name to the item in the qml file. But qquickwidget-> findChild< QObject * > ( objectName ) returns nullptr. What is wrong?
If I have pure qml layout, there is no problem to find this item from root window.
-
J JoeCFD has marked this topic as solved on