From 022bf4396ce3b53f00e84ed3d43166fe57882a2e Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 26 Nov 2021 20:20:56 +0100 Subject: [PATCH] QtSupport: Set a lower single step in ExamplesPageWidget view By default, the view scrolls by a whole row when using arrow keys or mouse wheel. With rows with a height as in the examples view, this causes more of a fast flickering than the impression of a scrolling. The single step value of 25 which is set by this change makes it look smoother. Change-Id: I7fe9fe49dab71cebdfd8b01eef245813783426ae Reviewed-by: Christian Stenger --- src/plugins/qtsupport/gettingstartedwelcomepage.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index 16613cfa5d5..d02dddcbce6 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -316,6 +317,8 @@ public: auto gridView = new GridView(this); gridView->setModel(&m_gridModel); gridView->setItemDelegate(&m_exampleDelegate); + if (auto sb = gridView->verticalScrollBar()) + sb->setSingleStep(25); vbox->addWidget(gridView); connect(&m_exampleDelegate, &ExampleDelegate::tagClicked,