@sush123
i managed to reproduce the error by defining InputRow like this :
//InputRow.qml
import QtQuick 2.0
import QtQuick.Layouts 1.12
RowLayout{
property alias inputContent : content // i use this to access the loader.item
property var component
Loader{
id:content
Layout.fillHeight: true
Layout.fillWidth: true
sourceComponent:component
}
}
and use it
component : Component{
id: userInput
Column{...}
}
then the only way i found to access val1 is this
userInput.inputContent.item.children[0].children[1].text
but this is too ugly ^^
But i have another idea, one solution that will work in any case for sure, no matter how your InputRow is defined
simply create 2 properties, and assign them when the TextInput text changes
InputRow{
id: userForm
property var userInput1
property var userInput2
component :
Column{
...
TextInput {
id:val1
text: "777"
onTextChanged: userForm.userInput1 = text
Component.onCompleted : userForm.userInput1 = text
}
}
Button{
onClicked : console.log(userForm.userInput1)
}
only drawback is that you create 2 additional variables