1. hexspinbox.cpp /* * The spin box supports integer values but can be extended to use different strings * with validate(), textFromValue() and valueFromText(). */ #include "hexspinbox.h" #include <QRegExpValidator> HexSpinBox::HexSpinBox(…
1. C++ GUI Qt4编程第三章,增加工具栏.状态栏和快捷键. 2. mainwindow.h /**/ #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> class QMenu; class QAction; class QToolBar; class QLabel; class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow();…