PDA

View Full Version : How to access the public properties of a qml page loaded through a Loader?



TheIndependentAquarius
27th November 2014, 10:44
AA.qml


Item
{
id: drawLinesOnC

property string lineColour
property int lineDrawingSourceType
property variant startEndPointArray

}



main.qml


Loader
{
id: drawLineLoaderA
source: "AA.qml"
}

-

How to access the public properties of AA.qml page loaded through Loader drawLineLoaderA?

Added after 19 minutes:

Found the solution :



drawLineLoaderA.source = "DrawLineLoader.qml"
drawLineLoaderA.item.lineColour = "black"
drawLineLoaderA.item.lineDrawingSourceType = 2