yolobs-studio/UI/combobox-ignorewheel.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
293 B
C++
Raw Permalink Normal View History

2019-07-27 12:47:10 +00:00
#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);
}