If I understood you well in CustomListModel I should add something like
QHash<int, QByteArray> customRoles;
customRoles.insert(ItemRoles::TriggerUpdate, "triggerUpdate");
setRoleNames(customRoles);
QHash<int, QByteArray> customRoles;
customRoles.insert(ItemRoles::TriggerUpdate, "triggerUpdate");
setRoleNames(customRoles);
To copy to clipboard, switch view to plain text mode
My ItemClass should contain a bool that become true when image download is finished.
Back in my CustomListModel, in 'QVariant data(const QModelIndex &index, int role) const' i have to insert something like this?
switch (role) {
case ItemRoles::TriggerUpdate:
if(itemsList.at(index.row())->triggerUpdate())
// update
...
}
switch (role) {
case ItemRoles::TriggerUpdate:
if(itemsList.at(index.row())->triggerUpdate())
// update
...
}
To copy to clipboard, switch view to plain text mode
If so, I'm having trouble to catch the right routine to call for update.
Bookmarks