Set placeholder text for field edit types uint/mac
This commit is contained in:
parent
7cf9c91014
commit
2eab3daa2f
@ -38,6 +38,7 @@ void FieldEdit::setType(FieldType type)
|
||||
break;
|
||||
case kMacAddress:
|
||||
setValidator(&macValidator_);
|
||||
setPlaceholderText("00:00:00:00:00:00");
|
||||
break;
|
||||
case kIp4Address:
|
||||
setValidator(&ip4Validator_);
|
||||
@ -56,6 +57,8 @@ void FieldEdit::setType(FieldType type)
|
||||
void FieldEdit::setRange(quint64 min, quint64 max)
|
||||
{
|
||||
uint64Validator_.setRange(min, max);
|
||||
if (type_ == kUInt64)
|
||||
setPlaceholderText(QString("%1 - %2").arg(min).arg(max));
|
||||
}
|
||||
|
||||
QString FieldEdit::text() const
|
||||
|
Loading…
Reference in New Issue
Block a user