This commit is contained in:
Chenwenxuan
2024-03-06 14:54:30 +08:00
commit edac2715f0
1525 changed files with 809982 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#include "dmspinbox.h"
#include "eventfilterwheel.h"
#include <QDebug>
#include <QEvent>
DMSpinBox::DMSpinBox(QWidget *parent) :
QSpinBox(parent) {
installEventFilter(new EventFilterWheel());
setFocusPolicy(Qt::StrongFocus);
setKeyboardTracking(false);
installEventFilter(this);
}
#ifdef QT_DEBUG
bool DMSpinBox::eventFilter(QObject *watched, QEvent *event)
{
// Q_UNUSED(watched)
// QDoubleSpinBox *castSBox = static_cast<QDoubleSpinBox*>(watched);
if(event->type()==QEvent::Timer)
{
QTimerEvent *tEvent = static_cast<QTimerEvent*>(event);
if(tEvent)
qDebug() << "<--QEvent::Timer-->" << tEvent->timerId();
return true;
}
return QObject::eventFilter(watched,event);
}
#endif