[Interest] Dynamic QML menu from C++ data?
Murphy, Sean
smurphy at walbro.com
Mon Aug 28 21:53:48 CEST 2017
Basically, I think I'm just missing the glue that gets me from the Qml delegate's text property and the QStandardItemModel::data(const QModelIndex &, int role) method
Menu {
id: settingsMenu
Instantiator {
model: settingsModel
onObjectAdded: settingsMenu.insertItem(index, object)
onObjectRemoved: settingsMenu.removeItem(object)
delegate: MenuItem {
text: settingsModel.??? // <--- what goes here?
}
}
}
More information about the Interest
mailing list