hey of course it is the same if your “if” condition is evaluated to “true”, but not if its “false”.
in your case if the component is not ready there might be a problem in the pother QMl files (you didn’t post it here so we can’t help you with that):
var component = Qt.createComponent("Game.qml");
if that doesn’t create a component either the QMl engine can’t find the file or there is an error in the Game.qml, in any case you should see some error in the application console?
↧