92fef6124
고영탁
환경 설정 - 설정 UI 완료
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <QtWidgets>
#include "formatterspinbox.h"
FormatterSpinBox::FormatterSpinBox(QWidget *parent)
: QSpinBox(parent)
{
m_nwidth = 2;
}
//! [1]
int FormatterSpinBox::valueFromText(const QString &text) const
{
return text.toInt();
}
//! [1]
//! [2]
QString FormatterSpinBox::textFromValue(int value) const
{
QString strTemp;
return tr("%1").arg(value,m_nwidth,10,QLatin1Char('0'));
}
//! [2]
void FormatterSpinBox::setFormatterWidth(int wid){
m_nwidth = wid;
}
|