KNewStuff
itemsview.cpp
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2010 Frederik Gladhorn <gladhorn@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Lesser General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public 00015 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #include "itemsview.h" 00019 00020 #include <QtGui/QScrollBar> 00021 00022 namespace KNS3 00023 { 00024 00025 ItemsView::ItemsView(QWidget* parent) 00026 : QListView(parent) 00027 { 00028 } 00029 00030 void ItemsView::wheelEvent(QWheelEvent* event) 00031 { 00032 // this is a workaround because scrolling by mouse wheel is broken in Qt list views for big items 00033 verticalScrollBar()->setSingleStep(10); 00034 QListView::wheelEvent(event); 00035 } 00036 00037 } // end KNS namespace 00038
KDE 4.6 API Reference