14 lines
293 B
C++
14 lines
293 B
C++
#include "combobox-ignorewheel.hpp"
|
|
|
|
ComboBoxIgnoreScroll::ComboBoxIgnoreScroll(QWidget *parent) : QComboBox(parent)
|
|
{
|
|
setFocusPolicy(Qt::StrongFocus);
|
|
}
|
|
|
|
void ComboBoxIgnoreScroll::wheelEvent(QWheelEvent *event)
|
|
{
|
|
if (!hasFocus())
|
|
event->ignore();
|
|
else
|
|
QComboBox::wheelEvent(event);
|
|
}
|