本系列文章长期更新修改.
QIntValidator,QDoubleValidator,QRegExpValidator,都是继承QValidator的验证器.
QIntValidator和QDoubleValidator分别是整数和浮点数的验证器,而QRegExpValidator则是正则表达式验证器,几乎可实现任何格式的输入验证.
属性:
QIntValidator
Methods
- __init__ (self, QObject parent)
- __init__ (self, int bottom, int top, QObject parent)
- int bottom (self)
- setBottom (self, int)
- setRange (self, int bottom, int top)
- setTop (self, int)
- int top (self)
- (QValidator.State, int) validate (self, QString, int)
QDoubleValidator
Types
- enum Notation { StandardNotation, ScientificNotation }