mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-12 12:58:16 +03:00
fix Qt API breakage from QWheelEvent
This commit is contained in:
parent
6635f9fa8f
commit
5df6935c3c
@ -1289,7 +1289,12 @@ bool View::event(QEvent *e)
|
||||
|
||||
case QEvent::Wheel:
|
||||
if (auto wheelEvent = dynamic_cast<QWheelEvent *>(e)) {
|
||||
emit wheelScrolled(wheelEvent->position().toPoint(), wheelEvent->angleDelta(), wheelEvent->buttons());
|
||||
#if QT_VERSION <= QT_VERSION_CHECK(5, 13, 0)
|
||||
QPoint position = QPoint(wheelEvent->x(), wheelEvent->y());
|
||||
#else
|
||||
QPoint position = wheelEvent->position().toPoint();
|
||||
#endif
|
||||
emit wheelScrolled(position, wheelEvent->angleDelta(), wheelEvent->buttons());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user