Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.4.1
Description
Code like
import QtQuick Window { id: win width: 640 height: 480 visible: true title: "Sandbox" property bool isMobile: false DelegateModel { id: myModel model: 5 delegate: Package { Item { Package.name: 'mobile' } Item { Package.name: 'tablet' } } } Repeater { model: win.isMobile ? myModel.parts.mobile : myModel.parts.tablet } }
results in
Warning: main.qml:32:45: Property "mobile" not found on type "QObject" model: win.isMobile ? myModel.parts.mobile : myModel.parts.tablet ^^^^^^ Error: main.qml:32:45: Could not compile binding for model: Cannot load property mobile from QObject of QQmlDelegateModel::parts with type QObject. model: win.isMobile ? myModel.parts.mobile : myModel.parts.tablet ^^^^^^
.