INNER CODE UNIT · C++
m_validator
zhangdoa/InnocenceEngine · Source/Editor/combolabeltext.cpp:11
m_validator = new QDoubleValidator(-2147483647, 2147483647, 4);
m_validator->setProperty("notation", QDoubleValidator::StandardNotation);
m_text = new QLineEdit();
m_text->setValidator(m_validator);
m_label = new AdjustLabel();
m_label->setText(labelText);
m_label->setAlignment(Qt::AlignRight);
m_label->Initialize(m_text);
connect(m_label, SIGNAL(Adjusted()), this, SLOT(TextGotEdited()));
connect(m_text, SIGNAL(textEdited(QString)), this, SLOT(TextGotEdited()));
}
void ComboLabelText::AlignLabelToTheLeft()
{
m_label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);