diff --git a/qt/stats_widget.cpp b/qt/stats_widget.cpp index d33039e..e3ba2be 100644 --- a/qt/stats_widget.cpp +++ b/qt/stats_widget.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -457,10 +458,15 @@ void StatsWidget::lockSizesChanged(bool checked) void StatsWidget::flipTable() { bool flipped = m_table->model() != m_model; + m_table->setSortingEnabled(!flipped); if (flipped) m_table->setModel(m_model); else - m_table->setModel(m_flippedModel); + { + QSortFilterProxyModel *proxy = new QSortFilterProxyModel; + proxy->setSourceModel(m_flippedModel); + m_table->setModel(proxy); + } refresh(); }