qt - How to access the public properties of a qml page loaded through a Loader? -


aa.qml

item {     id:             drawlinesonc      property string  linecolour     property int     linedrawingsourcetype     property variant startendpointarray  } 

main.qml

loader {    id:     drawlineloadera    source: "aa.qml" } 

-

how access public properties of aa.qml page loaded through loader drawlineloadera?

solution follows:

drawlineloadera.source = "drawlineloader.qml" if (drawlineloadera.status == loader.ready) {     if (drawlineloadera.item && drawlineloadera.item.linecolour)     {         drawlineloadera.item.linecolour            = "black"         drawlineloadera.item.linedrawingsourcetype = 2      } } 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -