Skip to content

Commit

Permalink
Check QT_VERSION for QWheelEvent constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
Veratil committed Jan 17, 2021
1 parent eebbdef commit ca59482
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/gui/TrackContainerView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,16 @@ void TrackContainerView::scrollArea::wheelEvent( QWheelEvent * _we )
&& _we->orientation() == Qt::Vertical)
{
// copy QWheelEvent but change orientation to Horizontal
QWheelEvent we(_we->posF(), _we->globalPosF(),
_we->pixelDelta(), _we->angleDelta(), _we->delta(),
Qt::Horizontal, _we->buttons(), _we->modifiers(),
_we->phase(), _we->source(), _we->inverted());
QWheelEvent we(
_we->posF(), _we->globalPosF(), _we->pixelDelta(),
_we->angleDelta(), _we->delta(), Qt::Horizontal,
_we->buttons(), _we->modifiers(), _we->phase(),
#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0))
_we->source(), _we->inverted()
#else
_we->source()
#endif
);
QScrollArea::wheelEvent(&we);
}
else
Expand Down

0 comments on commit ca59482

Please sign in to comment.