Disable edit action

This commit is contained in:
Chocobo1 2020-07-30 14:20:25 +08:00
parent a2a5c28c9f
commit b092fc9abb
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
2 changed files with 5 additions and 2 deletions

View file

@ -86,6 +86,7 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent)
setRootIsDecorated(false);
setItemsExpandable(false);
setAllColumnsShowFocus(true);
setEditTriggers(QAbstractItemView::NoEditTriggers);
setSelectionMode(QAbstractItemView::ExtendedSelection);
header()->setStretchLastSection(false);
// List Model
@ -390,7 +391,7 @@ void PeerListWidget::updatePeer(const BitTorrent::TorrentHandle *torrent, const
{
const QMap<int, QVariant> data =
{
{Qt::DisplayRole, displayData},
{Qt::DisplayRole, displayData},
{PeerListSortModel::UnderlyingDataRole, underlyingData},
{Qt::TextAlignmentRole, QVariant {textAlignmentData}},
{Qt::ToolTipRole, toolTip}