From 6031ee9c32023fe1202c7e8160dbb04fe4bd0429 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 13 Aug 2010 12:01:56 +0000 Subject: Re-disable scroll-change in comboboxes. --- client/widgets/combobox.cc | 15 +++++++++------ client/widgets/combobox.h | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/client/widgets/combobox.cc b/client/widgets/combobox.cc index 5980400..a167e29 100644 --- a/client/widgets/combobox.cc +++ b/client/widgets/combobox.cc @@ -49,10 +49,18 @@ QWindowsStyle s; #endif/*STYLE_HACK*/ +class MyQComboBox : public QComboBox { +protected: + void wheelEvent(QWheelEvent *e) + { + QCoreApplication::sendEvent(nativeParentWidget(), e); + } +}; + ComboBox::ComboBox(QDomNode &node, MacroWindow *macrowindow) : Widget(node, macrowindow) { - combobox = new QComboBox(); + combobox = new MyQComboBox(); widget = combobox; setCommonAttributes(combobox, node); @@ -199,11 +207,6 @@ bool ComboBox::eventFilter(QObject *obj, QEvent *event) return QObject::eventFilter(obj, event); } -void ComboBox::wheelEvent(QWheelEvent *e) -{ - QCoreApplication::sendEvent(combobox->nativeParentWidget(), e); -} - void ComboBox::changeEvent(QEvent *event) { if(event->type() == QEvent::EnabledChange) { diff --git a/client/widgets/combobox.h b/client/widgets/combobox.h index a706075..99b9795 100644 --- a/client/widgets/combobox.h +++ b/client/widgets/combobox.h @@ -59,7 +59,7 @@ public slots: protected: bool eventFilter(QObject *obj, QEvent *event); - void wheelEvent(QWheelEvent *); + // void wheelEvent(QWheelEvent *); void changeEvent(QEvent *event); private: -- cgit v1.2.3