Important: Please read the Qt Code of Conduct -

Pass a dynamically created QML object to a C++ function as a QDeclarativeItem

  • From what ive read so far, an object can be be passed as a QDeclarativeitem* using its ID. Can this be done for a dynamically created object that was created using something like:
    component = Qt.createComponent("somefile.qml");
    var obj = component.createObject(parent);

    Passing obj as the argument seems to result in a null pointer, any other ideas/tips?


  • My error...what i said doesnt work actually works perfectly!

Log in to reply