Skip to content

Guide on dynamic qml components

I just have discovered:

  • idOfElement.children.length holds the number of children elements of idOfElement
  • You can Qt.createComponent from javascript
  • idOfElement.destroy() also from javascript (this should not be used on elements not created in javascript
  • Empty a container element with idOfElement.children = "" of the elements created in javascript
  • width: parent.width of the created element seems not to be updated, only takes width on creation time (to investigate)

This could be helpful for a guide

Edited by Joan CiberSheep