MyTetra Share
Делитесь знаниями!
QString.inputMask / заведение маски ввода
Время создания: 18.09.2017 00:02
Текстовые метки: knowledge
Раздел: Python - PyQt4 - QString - mask
Запись: xintrea/mytetra_db_mcold/master/base/1505682157y451d0zjgr/text.html на raw.githubusercontent.com

inputMask : QString

This property holds the validation input mask.

If no mask is set, inputMask() returns an empty string.

Sets the QLineEdit's validation mask. Validators can be used instead of, or in conjunction with masks; see setValidator().

Unset the mask and return to normal QLineEdit operation by passing an empty string ("") or just calling setInputMask() with no arguments.

The table below shows the characters that can be used in an input mask. A space character, the default character for a blank, is needed for cases where a character is permitted but not required.


Character

Значение

A

ASCII alphabetic character required. A-Z, a-z.

a

ASCII alphabetic character permitted but not required.

N

ASCII alphanumeric character required. A-Z, a-z, 0-9.

n

ASCII alphanumeric character permitted but not required.

X

Any character required.

x

Any character permitted but not required.

9

ASCII digit required. 0-9.

0

ASCII digit permitted but not required.

D

ASCII digit required. 1-9.

d

ASCII digit permitted but not required (1-9).

#

ASCII digit or plus/minus sign permitted but not required.

H

Hexadecimal character required. A-F, a-f, 0-9.

h

Hexadecimal character permitted but not required.

B

Binary character required. 0-1.

b

Binary character permitted but not required.

>

All following alphabetic characters are uppercased.

<

All following alphabetic characters are lowercased.

!

Switch off case conversion.

\

Use \ to escape the special characters listed above to use them as separators.

The mask consists of a string of mask characters and separators, optionally followed by a semicolon and the character used for blanks. The blank characters are always removed from the text after editing.

Примеры:


Mask

Notes

000.000.000.000;_

IP address; blanks are _.

HH:HH:HH:HH:HH:HH;_

MAC address

0000-00-00

ISO Date; blanks are space

>AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#

License number; blanks are - and all (alphabetic) characters are converted to uppercase.

Так же в этом разделе:
 
MyTetra Share v.0.65
Яндекс индекс цитирования