Fix horizontal scrollbar not showing in group view

* Fixes #11300
This commit is contained in:
Jonathan White 2024-09-27 17:47:09 -04:00
parent c1a66a8be9
commit 15197173e1
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01

View File

@ -33,6 +33,7 @@ GroupView::GroupView(Database* db, QWidget* parent)
QTreeView::setModel(m_model);
setHeaderHidden(true);
setUniformRowHeights(true);
setTextElideMode(Qt::ElideNone);
// clang-format off
connect(this, SIGNAL(expanded(QModelIndex)), SLOT(expandedChanged(QModelIndex)));
@ -92,6 +93,7 @@ void GroupView::contextMenuShortcutPressed()
void GroupView::changeDatabase(const QSharedPointer<Database>& newDb)
{
m_model->changeDatabase(newDb.data());
setColumnWidth(0, sizeHintForColumn(0));
}
void GroupView::dragMoveEvent(QDragMoveEvent* event)
@ -134,6 +136,7 @@ void GroupView::expandedChanged(const QModelIndex& index)
Group* group = m_model->groupFromIndex(index);
group->setExpanded(isExpanded(index));
setColumnWidth(0, sizeHintForColumn(0));
}
void GroupView::recInitExpanded(Group* group)