making items select and activate so as to follow the presentation

This commit is contained in:
Chris Cochrun 2022-10-02 07:08:56 -05:00
parent 91bb08fbf2
commit b154cca3ed
3 changed files with 16 additions and 1 deletions

View file

@ -373,6 +373,14 @@ QVariantMap ServiceItemModel::getItem(int index) const {
}
bool ServiceItemModel::select(int id) {
for (int i = 0; i < m_items.length(); i++) {
QModelIndex idx = index(i);
ServiceItem *item = m_items[idx.row()];
item->setSelected(false);
qDebug() << "################";
qDebug() << "deselected" << item->name();
qDebug() << "################";
}
QModelIndex idx = index(id);
ServiceItem *item = m_items[idx.row()];
item->setSelected(true);