mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
parent
98bdfcef65
commit
63812ca951
7 changed files with 7 additions and 58 deletions
|
@ -40,7 +40,6 @@
|
|||
#include <QShortcut>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStandardItemModel>
|
||||
#include <QTableView>
|
||||
#include <QVector>
|
||||
#include <QWheelEvent>
|
||||
|
||||
|
@ -89,6 +88,7 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent)
|
|||
setAllColumnsShowFocus(true);
|
||||
setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
header()->setFirstSectionMovable(true);
|
||||
header()->setStretchLastSection(false);
|
||||
header()->setTextElideMode(Qt::ElideRight);
|
||||
|
||||
|
@ -163,13 +163,6 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent)
|
|||
handleSortColumnChanged(header()->sortIndicatorSection());
|
||||
const auto *copyHotkey = new QShortcut(QKeySequence::Copy, this, nullptr, nullptr, Qt::WidgetShortcut);
|
||||
connect(copyHotkey, &QShortcut::activated, this, &PeerListWidget::copySelectedPeers);
|
||||
|
||||
// This hack fixes reordering of first column with Qt5.
|
||||
// https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777
|
||||
QTableView unused;
|
||||
unused.setVerticalHeader(this->header());
|
||||
this->header()->setParent(this);
|
||||
unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));
|
||||
}
|
||||
|
||||
PeerListWidget::~PeerListWidget()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue