mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 03:39:39 +03:00
Don't use QWheelEvent deprecated functions
This commit is contained in:
parent
4971cb9a27
commit
2fd4381398
2 changed files with 16 additions and 2 deletions
|
@ -451,7 +451,14 @@ void PeerListWidget::wheelEvent(QWheelEvent *event)
|
|||
// Shift + scroll = horizontal scroll
|
||||
event->accept();
|
||||
|
||||
QWheelEvent scrollHEvent(event->pos(), event->globalPos(), event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
QWheelEvent scrollHEvent(event->position(), event->globalPosition()
|
||||
, event->pixelDelta(), event->angleDelta().transposed(), event->buttons()
|
||||
, event->modifiers(), event->phase(), event->inverted(), event->source());
|
||||
#else
|
||||
QWheelEvent scrollHEvent(event->pos(), event->globalPos()
|
||||
, event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
|
||||
#endif
|
||||
QTreeView::wheelEvent(&scrollHEvent);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1204,7 +1204,14 @@ void TransferListWidget::wheelEvent(QWheelEvent *event)
|
|||
// Shift + scroll = horizontal scroll
|
||||
event->accept();
|
||||
|
||||
QWheelEvent scrollHEvent(event->pos(), event->globalPos(), event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
QWheelEvent scrollHEvent(event->position(), event->globalPosition()
|
||||
, event->pixelDelta(), event->angleDelta().transposed(), event->buttons()
|
||||
, event->modifiers(), event->phase(), event->inverted(), event->source());
|
||||
#else
|
||||
QWheelEvent scrollHEvent(event->pos(), event->globalPos()
|
||||
, event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
|
||||
#endif
|
||||
QTreeView::wheelEvent(&scrollHEvent);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue