mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
Drop Qt 4 support
This commit is contained in:
@@ -32,24 +32,20 @@
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QModelIndexList>
|
||||
#ifdef QBT_USES_QT5
|
||||
#include <QTableView>
|
||||
#include <QHeaderView>
|
||||
#endif
|
||||
|
||||
#include "torrentcontentmodelitem.h"
|
||||
|
||||
TorrentContentTreeView::TorrentContentTreeView(QWidget* parent)
|
||||
: QTreeView(parent)
|
||||
{
|
||||
#ifdef QBT_USES_QT5
|
||||
// This hack fixes reordering of first column with Qt5.
|
||||
// https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777
|
||||
QTableView unused;
|
||||
unused.setVerticalHeader(header());
|
||||
header()->setParent(this);
|
||||
unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));
|
||||
#endif
|
||||
}
|
||||
|
||||
void TorrentContentTreeView::keyPressEvent(QKeyEvent *event) {
|
||||
|
||||
Reference in New Issue
Block a user