pyqt4文档阅读(10.1):QIntValidator-QDoubleValidator-QRegExpValidator

本文详细介绍了PyQt4中的QIntValidator、QDoubleValidator和QRegExpValidator,这三个继承自QValidator的验证器分别用于整数、浮点数和正则表达式的输入验证。内容包括它们的构造函数、属性、方法以及validate()函数的使用,特别是QDoubleValidator的符号类型notation和Intermediate与Invalid状态的解析。
摘要由CSDN通过智能技术生成

本系列文章长期更新修改.


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 }

Methods

    • 1
      点赞
    • 9
      收藏
      觉得还不错? 一键收藏
    • 0
      评论
    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

    当前余额3.43前往充值 >
    需支付:10.00
    成就一亿技术人!
    领取后你会自动成为博主和红包主的粉丝 规则
    hope_wisdom
    发出的红包
    实付
    使用余额支付
    点击重新获取
    扫码支付
    钱包余额 0

    抵扣说明:

    1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
    2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

    余额充值