SettingsPage: Pass on scroll event to page

If the settings widget does not have focus, pass the event to the page for scrolling down instead of changing the setting.

Fixes #1380
This commit is contained in:
Jonas Kvinge
2024-02-19 23:07:27 +01:00
parent 593a04d047
commit 306b3f72d8
2 changed files with 51 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ class QCheckBox;
class QComboBox;
class QRadioButton;
class QSpinBox;
class QDoubleSpinBox;
class QSlider;
class QLineEdit;
class QShowEvent;
@@ -75,6 +76,9 @@ class SettingsPage : public QWidget {
virtual void Save() = 0;
virtual void Cancel() {}
protected:
bool eventFilter(QObject *obj, QEvent *e) override;
signals:
void NotificationPreview(const OSDBase::Behaviour, const QString&, const QString&);
@@ -86,6 +90,7 @@ class SettingsPage : public QWidget {
QList<QPair<QRadioButton*, bool>> radiobuttons_;
QList<QPair<QComboBox*, QString>> comboboxes_;
QList<QPair<QSpinBox*, int>> spinboxes_;
QList<QPair<QDoubleSpinBox*, int>> double_spinboxes_;
QList<QPair<QSlider*, int>> sliders_;
QList<QPair<QLineEdit*, QString>> lineedits_;
};