当前位置:网站首页>Qlineedit set input mask
Qlineedit set input mask
2022-06-11 17:18:00 【litanyuan】
background
QLineEdit It's a single line text editor , It is often used for text input in the interface .QLineEdit Provides inputMask Use some specific characters to set the format and content of the input .
inputMask
①. summary
The input mask consists of two parts :; Before that is the input format and placeholder settings ,; Then there is the blank placeholder setting .
②. Format is set
A: Only letters can be entered , And don't omit
a: Only letters can be entered , It can be omitted
N: Input only Letters and numbers , And don't omit
n: Input only Letters and numbers , It can be omitted
X: You can enter any character , And don't omit
x: You can enter any character , It can be omitted
9: You can enter numbers , And don't omit
0: You can enter numbers , It can be omitted
D: You can enter numbers 1 ~ 9, And don't omit
d: You can enter numbers 1 ~ 9, It can be omitted
#: You can enter numbers and Plus minus :+ ,-, It can be omitted
H: You can enter 16 Hexadecimal characters , And don't omit
h: You can enter 16 Hexadecimal characters , It can be omitted
B: You can enter 2 Hexadecimal characters , And don't omit
b: You can enter 2 Hexadecimal characters , It can be omitted
>: All letters are capitalized
<: All letters to lowercase
!: Stop case conversion
\: The above to special characters are displayed as normal characters
When you have to input characters before you have finished typing , Enter press signal returnPressed No response .
③. Blank placeholder setting
A blank placeholder is what the placeholder displays when no content has been entered , The default is blank , Automatically delete after user input .
Application, for example,
ui.lineEdit->setInputMask(" Find the target 99;_");// Formatting text
ui.lineEdit_2->setInputMask("000.000.000.000;_");//IP Address input
ui.lineEdit_3->setInputMask("0000-00-00;_");// Date input


边栏推荐
- DFS and BFS notes (I) breadth first search based on C language
- ShellBrowser .NET Crack
- 【opencvsharp】opencvsharp_ samples. Core sample code Notes
- Classic reading of multi task learning: MMOE model
- 论文阅读 dyngraph2vec: Capturing Network Dynamics using Dynamic Graph Representation Learning
- Redis --- 学习 NoSQL 五大类型
- ASP. Net education OA system source code education industry OA system source code with document
- 7个人生工具:SWOT、PDCA、6W2H、SMART、WBS、时间管理、二八原则
- Oracle 分析函数 over 和MySQL 实现类似效果写法
- WYSIWYG markdown editor: typora
猜你喜欢

每周推荐短视频:菜鸟CEO谈未来物流新赛道

Classic reading of multi task learning: MMOE model

消息队列-推/拉模式学习 & ActiveMQ及JMS学习

TypeScript学习笔记(二)

Pycharm使用小技巧 - 如何设置背景图片

Message queue push / pull mode Learning & ActiveMQ and JMS learning

A set of ThinkPHP wechat applet mall source code with background management

RecyclerView缓存复用解析,源码解读

Authing Share|理解 SAML2 协议

^31原型面试题
随机推荐
Authing Share|理解 SAML2 协议
[Clickhouse column] create a new library, user and role
mysql 大表的拆分方式
Global and Chinese molten carbonate fuel cell industry outlook and market panoramic Research Report 2022-2028
Kernel density estimation (2D, 3D)
Is the securities account given by qiniu business school safe? Do you charge for opening an account
活动 | Authing 首次渠道合作活动圆满落幕
Report on the operation situation and future prospects of China's gear oil industry (2022-2028)
vscode保存代码时自动eslint格式化
Oracle数据库合并行记录,WMSYS.WM_CONCAT 函数的用和MySQL 中GROUP_CONCAT(id)的使用及比较。
Web security - shooting range notes
Science popularization genius on the left, madman on the right
A simple understanding of closures
Weekly recommended short video: rookie CEO talks about the new logistics track in the future
ASP.NET教育OA系统源码 教育行业OA系统源码带文档
Bentley 使用 Authing 快速实现应用系统与身份的集成
Recyclerview cache reuse analysis, source code interpretation
Solr (I) installation and permission control of Solr
Leetcode-- array
Typescript learning notes (II)