-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
Qt Creator 4.13.3
-
None
I read further into property definitions.
I found a list type definition. So I am trying to understand it.
I created an Item element (called it Glossary.qml).
It contained the following definition
property list<Text> aword: [
Text
,
Text
]
Then in the main qml element I created a call to
Glossary
Component.onCompleted
{
ac.aword.push( Text
);
console.log( ac.aword[0].text);
console.log( ac.aword[1].text);
console.log( ac.aword[2].text);
}
The push operation would not let me do this, my guess it wanted an "id" value.
When I moved the Text definition argument out of the push function and gave it an "id"
and placed that id in its place of the object definition everything worked.
Now my question is: If the element is created dynamically how to I added to
to the glossary property since it has no ID?