intoption.cc
来自「c++的guiQt做的开发」· CC 代码 · 共 30 行
CC
30 行
/** @file IntOption - class for widget containing one editable setting of type integer @author Martin Petricek*/#include "intoption.h"#include <QValidator>#include <QString>#include <QLineEdit>namespace gui {/** Default constructor of IntOption item @param parent parent Option Editor containing this control @param _key Key in settings for this option @param defValue Default value if option not found in configuration */IntOption::IntOption(const QString &_key/*=0*/,QWidget *parent/*=0*/,int defValue/*=0*/) : StringOption (_key,parent) { ed->setText(QString::number(defValue)); ed->setValidator(new QIntValidator(ed));}/** default destructor */IntOption::~IntOption() {}} // namespace gui
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?