KNewStuff

itemsview.cpp
1 /*
2  SPDX-FileCopyrightText: 2010 Frederik Gladhorn <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6 
7 #include "itemsview_p.h"
8 
9 #include <QScrollBar>
10 
11 namespace KNS3
12 {
13 
14 ItemsView::ItemsView(QWidget *parent)
15  : QListView(parent)
16 {
17 }
18 
19 void ItemsView::wheelEvent(QWheelEvent *event)
20 {
21  // this is a workaround because scrolling by mouse wheel is broken in Qt list views for big items
22  verticalScrollBar()->setSingleStep(10);
23  QListView::wheelEvent(event);
24 }
25 
26 } // end KNS namespace
27 
virtual bool event(QEvent *e)
virtual void wheelEvent(QWheelEvent *e) override
Definition: button.cpp:18
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 22:43:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.