Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.0
-
None
-
6dc0ba50bab2fa72978a7b5ee63dae9d66e8ad40
Description
Asynchronous Loader that has a source component of Row with a Repeater of 10 Text items. The delegates 1-9 get destructed as soon as they are constructed. Only the last one survives.
// main.cpp #include <QGuiApplication> #include <QQuickView> int main(int argc, char* argv[]) { QGuiApplication app(argc, argv); QQuickView view; view.setSource(QUrl::fromLocalFile("main.qml")); view.show(); return app.exec(); }
// main.qml import QtQuick 2.1 Loader { width: 300 height: 200 asynchronous: true sourceComponent: Row { Repeater { Text { text: index Component.onCompleted: console.log("Component.onCompleted:", index) Component.onDestruction: console.log("Component.onDestruction:", index) } model: ListModel { id: model } onCountChanged: console.log("count:", count) } Component.onCompleted: { for (var i = 0; i < 10; ++i) model.append({"foo": "bar"}) } } }
PS. The problem does not occur with qmlscene.
Attachments
Issue Links
- is required for
-
QTBUG-38879 QML TableView hides headers in asynchronous Loader
-
- Closed
-