Don't use hack to make the first column movable

PR #16545.
This commit is contained in:
thalieht
2022-03-01 06:50:10 +02:00
committed by GitHub
parent 98bdfcef65
commit 63812ca951
7 changed files with 7 additions and 58 deletions

View File

@@ -37,7 +37,6 @@
#include <QMenu>
#include <QPalette>
#include <QStandardItemModel>
#include <QTableView>
#include <QUrl>
#include "base/bittorrent/session.h"
@@ -61,15 +60,9 @@ SearchJobWidget::SearchJobWidget(SearchHandler *searchHandler, QWidget *parent)
{
m_ui->setupUi(this);
// This hack fixes reordering of first column with Qt5.
// https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777
QTableView unused;
unused.setVerticalHeader(m_ui->resultsBrowser->header());
m_ui->resultsBrowser->header()->setParent(m_ui->resultsBrowser);
unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));
loadSettings();
header()->setFirstSectionMovable(true);
header()->setStretchLastSection(false);
header()->setTextElideMode(Qt::ElideRight);