┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/private/kitemlistsmoothscroller.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp
index f77d3df58..343399179 100644
--- a/src/kitemviews/private/kitemlistsmoothscroller.cpp
+++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp
@@ -186,9 +186,15 @@ void KItemListSmoothScroller::handleWheelEvent(QWheelEvent* event)
m_smoothScrolling = true;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ QWheelEvent *copy = event->clone();
+ QApplication::sendEvent(m_scrollBar, copy);
+ event->setAccepted(copy->isAccepted());
+#else
QWheelEvent copy = *event;
QApplication::sendEvent(m_scrollBar, &copy);
event->setAccepted(copy.isAccepted());
+#endif
m_smoothScrolling = previous;
}