The Qt Event of the Year: Qt World Summit 2026
Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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); }