In addition to what @TheIndependentAquarius said, you can declare a property of the appropriate type in your bootloader:
Loader {
id: drawLineLoaderA
readonly property AA aa: item
source: "AA.qml"
}
And then use it like this:
if (drawLineLoaderA.aa) {
drawLineLoaderA.aa.color = "black"
}
Now you have clearly stated that you are dealing with an element of type AA and with nothing else, and you will receive autocomplete properties of the loaded objects as a bonus.
1. AA.qml( ), Loader onLoaded, @troyane.
2. AA.qml property string lineColour. color QML. property color lineColour, QML , . , color QColor ++ ( QColor ++, ).