Closed susron closed 9 years ago
Using code in javascript to dynamically create a component containing QmlVlc never calls finishCreation ( no component.statusChanged event?)
: eg
var player; var component; function createPlayerObjects() { component = Qt.createComponent("player.qml"); if (component.status == Component.Ready) finishCreation(); else component.statusChanged.connect(finishCreation); } function finishCreation() { if (component.status == Component.Ready) { player = component.createObject(root, {"x": 0, "y": 0}); if (player == null) { // Error Handling console.log("Error creating object"); } } else if (component.status == Component.Error) { // Error Handling console.log("Error loading component:", component.errorString()); } }
Did you try same code but without QmlVlc in player.qml? Do you see something in debug output?
player.qml
my fault ... forgot to RegisterQmlVlc();
sorry
I'm glad you solved it.
Using code in javascript to dynamically create a component containing QmlVlc never calls finishCreation ( no component.statusChanged event?)
: eg