Ola Røer Thorsen wrote:

> My worry here is that deleteLater() is sometimes still too soon for the
> QML engine to keep up, especially when there is a lot of things going on
> in the Quick scene.

Or if there is an animation for item removal.

> Could this be the case? If so, what is the rock-solid way to do this?

Instantiate the QObjects in QML so that the QML engine owns them. 

  delegate: Item {

    // MyObject has properties.
    // Instance deleted by the QML engine when no longer needed
    MyObject {
      id: obj
      data: model.structuredData
    }
  }


This is the kind of thing that I describe in my QtCon talk:

 https://conf.qtcon.org/en/qtcon/public/events/355 

Thanks,

Steve.


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to