summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qlistview.h
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2014-12-05 16:08:28 +0300
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-05-26 08:04:57 +0000
commit59cc316620a2169d48e00822c97a96bd03079eed (patch)
tree7d5e2a96c70b7e2d8b816de29547d8c3cee84e4a /src/widgets/itemviews/qlistview.h
parent8458b4054a8e5a2f90238d7973050a8d797fea7c (diff)
Allow horizontal scrolling with a mouse wheel for QListView
Convert vertical wheel events to horizontal for two cases of the items layout when vertical scrolling is impossible: 1) TopToBottom flow with wrapping 2) LeftToRight flow without wrapping Do it only for pure vertical events to avoid a mess for such devices as touchpads or Apple Mouse. [ChangeLog][QtWidgets][Important Behavior Changes] Allow horizontal scrolling with a vertical mouse wheel for QListView. Task-number: QTBUG-37007 Change-Id: Ie2525153fa7b443d27ca08cc5f5d4d7ecdb8c183 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/widgets/itemviews/qlistview.h')
-rw-r--r--src/widgets/itemviews/qlistview.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qlistview.h b/src/widgets/itemviews/qlistview.h
index f62c96067f..ac65a47d9f 100644
--- a/src/widgets/itemviews/qlistview.h
+++ b/src/widgets/itemviews/qlistview.h
@@ -146,6 +146,9 @@ protected:
void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+#ifndef QT_NO_WHEELEVENT
+ void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE;
+#endif
void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;