summaryrefslogtreecommitdiff
path: root/client/widgets/combobox.cc
diff options
context:
space:
mode:
authordeva <deva>2010-08-13 12:01:56 +0000
committerdeva <deva>2010-08-13 12:01:56 +0000
commit6031ee9c32023fe1202c7e8160dbb04fe4bd0429 (patch)
tree4ea9085cac31f781e8dc4b44c620e0e186e9e493 /client/widgets/combobox.cc
parentc58541468c5477323e35837a8f0aeaf41e5a0794 (diff)
Re-disable scroll-change in comboboxes.
Diffstat (limited to 'client/widgets/combobox.cc')
-rw-r--r--client/widgets/combobox.cc15
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) {