yolobs-studio/UI/spinbox-ignorewheel.cpp

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

15 lines
287 B
C++
Raw Normal View History

2019-07-27 12:47:10 +00:00
#include "spinbox-ignorewheel.hpp"
SpinBoxIgnoreScroll::SpinBoxIgnoreScroll(QWidget *parent) : QSpinBox(parent)
{
setFocusPolicy(Qt::StrongFocus);
}
void SpinBoxIgnoreScroll::wheelEvent(QWheelEvent *event)
{
if (!hasFocus())
event->ignore();
else
QSpinBox::wheelEvent(event);
}