QML中正则式的应用
发布时间:2020-12-14 04:24:01 所属栏目:百科 来源:网络整理
导读:QML 中RegExpValidator(正则表达式)简单例子 2012-08-28 21:36:19 分类: 嵌入式 import QtQuick 1 . 1 Rectangle { width : 360 height : 360 TextInput anchors . centerIn : parent text "1" validator : RegExpValidator { regExp : / [ 0 - 5 ] - 9 [
QML 中RegExpValidator(正则表达式)简单例子
2012-08-28 21:36:19
分类:嵌入式
第一个数为:0-5
第二个数为:0-9
第三个数为:0-5
第四个数为:.
第五个数为:0-9
同样也可以输入限制字符串:
:DoubleValidatorid:intval;decimals:1;bottom:380top:500;notation.StandardNotation}
结果是:输入在380-500,小数位:1;
==========================================================================
2012年8月30日19:41:32 更新
^[1{1,2}$}
结果是只能输入:1-99,具体的含义:[1-9]每位范围1-9;{1,2}位数1-2(总共2位);
()?|^1^2-3^24]0}
结果是只能输入:1-24,允许有一位小数
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Oracle Linux 迷途知返
- c – 将多个初始化器列表传递给可变函数模板有困难
- 发送无效的xml时如何修复websphere上的java堆空间
- eval()和JSON.parse()解析数据
- c# – 多个Control.BeginInvoke / Invoke调用按顺序执行?
- postgresql – osm2pgsql:函数AddGeometryColumn不存在
- Git发现git push origin master 报错的解决方法
- EEPROM && FLASH
- visual-c – 如何交换MFC CString?
- WebLogic部署异常问题weblogic.descriptor.DescriptorExcep