diff options
author | deva <deva> | 2010-08-13 12:01:56 +0000 |
---|---|---|
committer | deva <deva> | 2010-08-13 12:01:56 +0000 |
commit | 6031ee9c32023fe1202c7e8160dbb04fe4bd0429 (patch) | |
tree | 4ea9085cac31f781e8dc4b44c620e0e186e9e493 /client/widgets | |
parent | c58541468c5477323e35837a8f0aeaf41e5a0794 (diff) |
Re-disable scroll-change in comboboxes.
Diffstat (limited to 'client/widgets')
-rw-r--r-- | client/widgets/combobox.cc | 15 | ||||
-rw-r--r-- | 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: |