Like it was said install an event filter and handle (or simply not handle) Wheel events by yourself
void SomeClass::initializeStuff()
{
m_combo->installEventFilter(this);
}
{
if(event
->type
() == QEvent::Wheel && obj
== m_combo
) {
qDebug() << "Wheel event blocked";
return true;
}
return false;
}
void SomeClass::initializeStuff()
{
m_combo = new QComboBox(this);
m_combo->installEventFilter(this);
}
bool SomeClass::eventFilter(QObject *obj, QEvent *event)
{
if(event->type() == QEvent::Wheel && obj == m_combo)
{
qDebug() << "Wheel event blocked";
return true;
}
return false;
}
To copy to clipboard, switch view to plain text mode
Bookmarks