mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17:23:07 -07:00
Shift + scroll = horizontal scroll, Closes #5980
Only for TransferListWidget, PeerListWidget
This commit is contained in:
parent
d73688bfd8
commit
f4652b3f7b
4 changed files with 33 additions and 0 deletions
|
@ -40,6 +40,7 @@
|
|||
#include <QRegExp>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QWheelEvent>
|
||||
#ifdef QBT_USES_QT5
|
||||
#include <QTableView>
|
||||
#endif
|
||||
|
@ -933,6 +934,20 @@ bool TransferListWidget::loadSettings()
|
|||
return ok;
|
||||
}
|
||||
|
||||
void TransferListWidget::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
event->accept();
|
||||
|
||||
if(event->modifiers() & Qt::ShiftModifier) {
|
||||
// Shift + scroll = horizontal scroll
|
||||
QWheelEvent scrollHEvent(event->pos(), event->globalPos(), event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
|
||||
QTreeView::wheelEvent(&scrollHEvent);
|
||||
return;
|
||||
}
|
||||
|
||||
QTreeView::wheelEvent(event); // event delegated to base class
|
||||
}
|
||||
|
||||
QStringList extractHashes(const QList<BitTorrent::TorrentHandle *> &torrents)
|
||||
{
|
||||
QStringList hashes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue