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.
20 lines
272 B
C++
20 lines
272 B
C++
#pragma once
|
|
|
|
#include <QSpinBox>
|
|
#include <QInputEvent>
|
|
#include <QtCore/QObject>
|
|
|
|
|
|
class SpinBoxIgnoreScroll : public QSpinBox {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
SpinBoxIgnoreScroll(QWidget *parent = nullptr);
|
|
|
|
protected:
|
|
|
|
virtual void wheelEvent(QWheelEvent *event) override;
|
|
};
|
|
|
|
|