Maybe it's possible to use dynamically created components, which you can refer to by the Javascript variable but only within a function (http://qt-project.org/doc/qt-4.8/qde...icobjects.html). I use this method for creating and destroying dynamic components.
You can also create a component from a QML file (http://doc.qt.nokia.com/4.7-snapshot...documents.html) but I don't know if you can assign the id after it's created.
Bookmarks