Get children Id from another QML file
-
Hey,
I am trying to get id of children element by another QML file.
-
The id is not an ordinary object property. You cannot refer to it like this:
Item { id: myItem } Button { onClicked: console.log( myItem.id ) // <- wrong }
-
Hey,
I am trying to get id of children element by another QML file.
@shwt.saxena said:
I am trying to get id of children element by another QML file.
What do you want to do with the id?
-
I want to create modal window when screen navigate to other screen on click event.
-
I want to create modal window when screen navigate to other screen on click event.
@shwt.saxena said:
I want to create modal window when screen navigate to other screen on click event.
You don't need access to the id. Use signals and signal handlers: http://doc.qt.io/qt-5/qtqml-syntax-signals.html