diff options
Diffstat (limited to 'client')
-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: |