ComboBox - disable mouse wheel scrolling
-
Hi,
how can I prevent the mouse wheel to change the currentitem of a ComboBox?
-
Nobody has an idea?
-
Install event filter for the combobox. And "eat" event in event handler:
ui->comboBox->installEventFilter(this); ... bool myForm::eventFilter(QObject *o, QEvent *ev) { if (o == ui->comboBox && ev->type() == QEvent::Wheel) { return true; } return QObject::eventFilter(o, ev); }