Give the tables default sorting

This commit is contained in:
eelke 2021-06-12 07:36:24 +02:00
parent 0da493f1e4
commit ddc163a0ee
10 changed files with 66 additions and 50 deletions

View file

@ -18,6 +18,7 @@
#include "widgets/CatalogIndexPage.h"
#include <QApplication>
#include <QHeaderView>
#include <QStringBuilder>
#include <QSortFilterProxyModel>
#include <QTableWidget>
@ -38,7 +39,8 @@ CatalogTablesPage::CatalogTablesPage(QWidget *parent)
m_tablesModel = new TablesTableModel(this);
m_tablesSortFilter = new QSortFilterProxyModel(this);
m_tablesSortFilter->setSourceModel(m_tablesModel);
m_tableView->setModel(m_tablesSortFilter);
m_tableView->setModel(m_tablesSortFilter);
m_tableView->horizontalHeader()->setSortIndicator(TablesTableModel::NameCol, Qt::AscendingOrder);
m_tableView->setSortingEnabled(true);
// - Columns page