mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
9249403c96
Ignore wheelEvent using subclass slider,spinbox,combobox with eventhandlers: wheelEvent - ignore if widget is not focused, leaveEvent - clear focus when mouse leaves event. Use these new subclass widgets in properties to ignore wheelEvent when scrolling.
24 lines
428 B
C++
24 lines
428 B
C++
#pragma once
|
|
|
|
#include <QSlider>
|
|
#include "slider-ignorewheel.hpp"
|
|
|
|
class DoubleSlider : public SliderIgnoreScroll {
|
|
Q_OBJECT
|
|
|
|
double minVal, maxVal, minStep;
|
|
|
|
public:
|
|
DoubleSlider(QWidget *parent = nullptr);
|
|
|
|
void setDoubleConstraints(double newMin, double newMax,
|
|
double newStep, double val);
|
|
|
|
signals:
|
|
void doubleValChanged(double val);
|
|
|
|
public slots:
|
|
void intValChanged(int val);
|
|
void setDoubleVal(double val);
|
|
};
|