Move modified_widgets to widgets

This commit is contained in:
AdenKoperczak 2025-05-24 17:52:45 -04:00
parent e78aca7377
commit 81b0402e8a
No known key found for this signature in database
GPG key ID: 9843017036F62EE7
6 changed files with 9 additions and 10 deletions

View file

@ -0,0 +1,23 @@
#include <QSpinBox>
#include <QWheelEvent>
class QFocusedSpinBox : public QSpinBox
{
Q_OBJECT
public:
using QSpinBox::QSpinBox;
protected:
void wheelEvent(QWheelEvent* event) override
{
if (hasFocus())
{
QSpinBox::wheelEvent(event);
}
else
{
event->ignore();
}
}
};