Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.5
-
4dbd70b5a (dev)
Description
import QtQuick import QtQuick.Controls import QtQuick.Layouts ApplicationWindow { width: 800 height: 800 visible: true Repeater { // Doesn't work: model: [ { displayName: "None", roundedScale: 0 }, { displayName: "ExtraSmall", roundedScale: 1 }, { displayName: "Small", roundedScale: 2 }, { displayName: "Medium", roundedScale: 3 }, { displayName: "Large", roundedScale: 4 }, { displayName: "ExtraLarge", roundedScale: 5 }, { displayName: "Full", roundedScale: 6 } ] // Works: // model: ListModel { // ListElement { displayName: "None"; roundedScale: 0 } // ListElement { displayName: "ExtraSmall"; roundedScale: 1 } // ListElement { displayName: "Small"; roundedScale: 2 } // ListElement { displayName: "Medium"; roundedScale: 3 } // ListElement { displayName: "Large"; roundedScale: 4 } // ListElement { displayName: "ExtraLarge"; roundedScale: 5 } // ListElement { displayName: "Full"; roundedScale: 6 } // } ColumnLayout { id: scaleLayout required property string displayName required property int roundedScale Label { text: scaleLayout.displayName } Repeater { model: 13 Button { text: scaleLayout.roundedScale Material.elevation: modelData } } } } }
Attachments
For Gerrit Dashboard: QTBUG-108261 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
520292,5 | QmlModels: Create dynamic properties on the fly when initializing | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |