mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-06-25 08:09:53 -04:00
16 lines
300 B
C++
16 lines
300 B
C++
#include "moc_spinbox-ignorewheel.cpp"
|
|
|
|
SpinBoxIgnoreScroll::SpinBoxIgnoreScroll(QWidget *parent) : QSpinBox(parent)
|
|
{
|
|
setFocusPolicy(Qt::StrongFocus);
|
|
}
|
|
|
|
void SpinBoxIgnoreScroll::wheelEvent(QWheelEvent *event)
|
|
{
|
|
if (!hasFocus()) {
|
|
event->ignore();
|
|
} else {
|
|
QSpinBox::wheelEvent(event);
|
|
}
|
|
}
|