#pragma once #include #include "iProperty_global.h" class I_PROPERTY_EXPORT ZxIntSpinEdit : public QSpinBox { Q_OBJECT public: ZxIntSpinEdit(QWidget *parent = 0); protected: virtual void focusInEvent(QFocusEvent *e); virtual void focusOutEvent(QFocusEvent * e); virtual void mousePressEvent(QMouseEvent * e); void setAutoSelectAll(bool bAuto); bool isAutoSelectAll() const; private: bool eventFilter(QObject *o, QEvent *e); private: bool m_bClickFocusIn : 1; bool m_bAutoSelectAll : 1; };