当前位置:网站首页>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


边栏推荐
- ^31原型面试题
- 【clickhouse专栏】新建库、用户及角色
- CS0006 C# 未能找到元数据文件“C:\Users\...问题
- Oracle数据库合并行记录,WMSYS.WM_CONCAT 函数的用和MySQL 中GROUP_CONCAT(id)的使用及比较。
- Real time myth -- real-time RTOS multitask performance analysis
- GemBox. Bundle 43.0 Crack
- GemBox.Bundle 43.0 Crack
- Pychart tips - how to set up a background picture
- [opencvsharp] spot detection barcode decoding image operation image rotation / flip / Zoom perspective transformation image display control demo notes
- Global and China Mobile Network Optimization (MnO) industry development panoramic survey and Investment Strategy Research Report 2022-2028
猜你喜欢

^32 execution context stack interview questions
Persistence mechanism of redis

子类继承了什么、多态、 向上转型

Guide to Dama data management knowledge system: percentage of chapter scores

用实际案例分析PMP与ACP应该考哪个?哪个更有用?

Docker安装mysql5.7(开启binlog功能、修改字符)

Elasitcsearch basic learning notes (1)

Format eslint automatique lorsque vscode enregistre le Code

Dynamic: capturing network dynamics using dynamic graph representation learning

Science popularization genius on the left, madman on the right
随机推荐
Oracle数据库合并行记录,WMSYS.WM_CONCAT 函数的用和MySQL 中GROUP_CONCAT(id)的使用及比较。
Learning C language from scratch day 039
每周推荐短视频:菜鸟CEO谈未来物流新赛道
Oracle database merge row records, wmsys WM_ Use of the concat function and group in MySQL_ Use and comparison of concat (ID).
Classic reading of multi task learning: MMOE model
Authing Share|理解 SAML2 协议
API management artifact that allows you to call wow directly
LeetCode——42. Connected to rainwater (double pointer)
Elasitcsearch basic learning notes (1)
如何把树结构存储到数据库
Haas, which integrates relevant technologies of Alibaba cloud, Dharma Institute and pingtouge, has officially announced the book
C语言:使用.h和.c文件遇到的问题总结
ASP.NET教育OA系统源码 教育行业OA系统源码带文档
Oracle generates non duplicate string sys_ Guid() and MySQL generate unique values
Docker installs mysql5.7 (enable binlog function and modify characters)
GUI guess number game, directly open play
启牛推荐开通的股票账户安全吗?靠谱吗
Environment configuration and pymysql installation
What subclasses inherit, polymorphism, and upward transformation
Analyze which should be tested in PMP and ACP with actual cases? Which is more useful?