I've got a custom QML object called Target.qml. I would like to create dynamic instances of this object using Qt.createQmlObject().
It works when using builtin qml objects like Image:
var newTarget = Qt.createQmlObject('import Qt 4.7; Image {source: "widgets/SlideSwitchImages/knob.png"; }', parent);
But fails when using any custom object types like:
var newTarget = Qt.createQmlObject('import Qt 4.7; Target {}', parent);
If however I use my custom Target type statically in QML everything works. Is this a known limitation, any workarounds?