Fix another GroupView bug
This commit is contained in:
parent
211a72e144
commit
cc1de6a649
2 changed files with 15 additions and 0 deletions
|
@ -45,6 +45,12 @@ GroupView::~GroupView()
|
|||
m_groups.clear();
|
||||
}
|
||||
|
||||
void GroupView::setModel(QAbstractItemModel *model)
|
||||
{
|
||||
QAbstractItemView::setModel(model);
|
||||
connect(model, &QAbstractItemModel::modelReset, this, &GroupView::modelReset);
|
||||
}
|
||||
|
||||
void GroupView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
|
||||
const QVector<int> &roles)
|
||||
{
|
||||
|
@ -133,6 +139,12 @@ void GroupView::updateGeometries()
|
|||
viewport()->update();
|
||||
}
|
||||
|
||||
void GroupView::modelReset()
|
||||
{
|
||||
scheduleDelayedItemsLayout();
|
||||
executeDelayedItemsLayout();
|
||||
}
|
||||
|
||||
bool GroupView::isIndexHidden(const QModelIndex &index) const
|
||||
{
|
||||
Group *cat = category(index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue