2019-04-21 04:10:46 -07:00
|
|
|
#include "combobox-ignorewheel.hpp"
|
2019-04-06 20:56:52 -04:00
|
|
|
|
|
|
|
ComboBoxIgnoreScroll::ComboBoxIgnoreScroll(QWidget *parent) : QComboBox(parent)
|
|
|
|
{
|
|
|
|
setFocusPolicy(Qt::StrongFocus);
|
|
|
|
}
|
|
|
|
|
2019-04-21 04:05:51 -07:00
|
|
|
void ComboBoxIgnoreScroll::wheelEvent(QWheelEvent *event)
|
2019-04-06 20:56:52 -04:00
|
|
|
{
|
|
|
|
if (!hasFocus())
|
|
|
|
event->ignore();
|
|
|
|
else
|
|
|
|
QComboBox::wheelEvent(event);
|
|
|
|
}
|