realoption.cc

来自「c++的guiQt做的开发」· CC 代码 · 共 30 行

CC
30
字号
/** @file RealOption - class for widget containing one editable setting of type float (internally represented as a double)<br> Used as one item in option window @author Martin Petricek*/#include "realoption.h"#include <QValidator>#include <QLineEdit>namespace gui {/** Default constructor of RealOption 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 */RealOption::RealOption(const QString &_key/*=0*/,QWidget *parent/*=0*/,double _defValue/*=0*/) : StringOption (_key,parent) { ed->setText(QString::number(_defValue)); ed->setValidator(new QDoubleValidator(ed));}/** default destructor */RealOption::~RealOption() {}} // namespace gui

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?