mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-16 13:37:05 -04:00
For the "ignore wheel" widgets, do not leave focus on mouse leave events. This causes unintended side effects such as not being able to type in edit boxes, and is very annoying.
15 lines
294 B
C++
15 lines
294 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);
|
|
}
|