mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -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
|
@ -35,6 +35,7 @@
|
|||
#include <QMenu>
|
||||
#include <QClipboard>
|
||||
#include <QMessageBox>
|
||||
#include <QWheelEvent>
|
||||
#ifdef QBT_USES_QT5
|
||||
#include <QTableView>
|
||||
#endif
|
||||
|
@ -455,3 +456,16 @@ void PeerListWidget::handleSortColumnChanged(int col)
|
|||
}
|
||||
}
|
||||
|
||||
void PeerListWidget::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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue