qt6-bb10/tests/auto/widgets/widgets
Sophie Kums aa09bea00c control scrolling of QTabBar using StyleHint
Mouse wheel/touchpad scroll signals sent to the tab bar trigger
cycling through the tabs. In applications where the tab bar is
close to "mouse click hotspots", the cursor may accidentally be
left over the tab bar instead of the main content of the window.
When the user wants to scroll up/down the main conten, the
scroll signals are thus sent to the tab bar and instead of
scrolling, the focus switches to another tab. This is
confusing to the user, because not only does the application
not carry out the desired action (scrolling through the main
content), it jumps to a different tab. Two common examples of
applications affected by this nuisance are Konsole and any kind
of browser (file browser or web browser), where the address bar
is right below the tab bar. Moreover, on macOS, scroll events
do not have an effect on the tab bar widget of the native UI.
Currently, the code makes use of preprocessor directives to
achieve consistent behavior on macOS (`#ifndef Q_OS_MAC`). This
patch implements the check of a StyleHint in order to determine
if scroll events on the tabbar should have an effect. This
approach is more consistent with Qt coding style than
OS-dependent preprocessor directives and, in addition, makes
the behavior configurable according to the user's preferences.

[ChangeLog][QtWidgets][QStyle] Added
SH_TabBar_AllowWheelScrolling as a style hint to enable/disable
cycling through tabs using the scroll wheel. This defaults to
true in all styles except the macOS one so there is no change in
existing behavior.

Change-Id: I99eeb5a1aab03cbc574fac7187d85a8a2d60cf34
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-01-19 19:10:41 +01:00
..
qabstractbutton Remove the qmake project files 2021-01-07 15:32:28 +01:00
qabstractscrollarea Remove the qmake project files 2021-01-07 15:32:28 +01:00
qabstractslider Remove the qmake project files 2021-01-07 15:32:28 +01:00
qabstractspinbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qbuttongroup Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcalendarwidget Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcheckbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcombobox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcommandlinkbutton Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdatetimeedit Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdial Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdialogbuttonbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdockwidget Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdoublespinbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfocusframe Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfontcombobox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qframe Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
qgroupbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qkeysequenceedit Remove the qmake project files 2021-01-07 15:32:28 +01:00
qlabel Introduce QUrlResourceProvider to load resources for HTML 2021-01-12 15:33:10 +03:00
qlcdnumber Remove the qmake project files 2021-01-07 15:32:28 +01:00
qlineedit tst_qlineedit: expect failure only on armv7 2021-01-07 16:53:22 +02:00
qmainwindow Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmdiarea Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmdisubwindow Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmenu Fix the tips still show when cursor move to another action 2021-01-15 12:26:41 +01:00
qmenubar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qopenglwidget Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
qplaintextedit Android: exclude failing tests for tst_QPlainTextEdit on Android 2021-01-11 12:14:35 +00:00
qprogressbar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qpushbutton Remove the qmake project files 2021-01-07 15:32:28 +01:00
qradiobutton Remove the qmake project files 2021-01-07 15:32:28 +01:00
qscrollarea Remove the qmake project files 2021-01-07 15:32:28 +01:00
qscrollbar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsizegrip Remove the qmake project files 2021-01-07 15:32:28 +01:00
qslider Remove the qmake project files 2021-01-07 15:32:28 +01:00
qspinbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsplashscreen Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsplitter Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstackedwidget Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstatusbar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtabbar control scrolling of QTabBar using StyleHint 2021-01-19 19:10:41 +01:00
qtabwidget Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextbrowser Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextedit Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtoolbar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtoolbox Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtoolbutton Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Android: exclude tests crashing at start 2020-11-16 13:35:44 +02:00