diff options
Diffstat (limited to 'client/widgets/combobox.cc')
-rw-r--r-- | client/widgets/combobox.cc | 15 |
1 files changed, 9 insertions, 6 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) { |