Qt5: fix deprecation warnings of QWheelEvent in Qt 5.15
This commit is contained in:
@@ -270,8 +270,13 @@ public:
|
||||
// Thus, we filter out horizontal scrolling.
|
||||
if (event->type() == QEvent::Wheel) {
|
||||
QWheelEvent* we = static_cast<QWheelEvent*>(event);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
if (qAbs(we->angleDelta().x()) > qAbs(we->angleDelta().y()))
|
||||
return true;
|
||||
#else
|
||||
if (we->orientation() == Qt::Horizontal)
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
else if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
|
||||
|
||||
Reference in New Issue
Block a user