diff --git a/src/gui/properties/peerlistwidget.cpp b/src/gui/properties/peerlistwidget.cpp index 24253e8d5..48fae4dfe 100644 --- a/src/gui/properties/peerlistwidget.cpp +++ b/src/gui/properties/peerlistwidget.cpp @@ -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; } diff --git a/src/gui/transferlistwidget.cpp b/src/gui/transferlistwidget.cpp index c396d38c7..bec46a293 100644 --- a/src/gui/transferlistwidget.cpp +++ b/src/gui/transferlistwidget.cpp @@ -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; }