pub struct InputMethodHint(/* private fields */);
Expand description

Flags that alter the behavior:

C++ enum: Qt::InputMethodHint.

C++ documentation:

Flags that alter the behavior:

Flags that restrict input (exclusive flags):

Masks:

Note: If several exclusive flags are OR-ed together, the resulting character set will consist of the union of the specified sets. For instance specifying ImhNumbersOnly and ImhUppercaseOnly would yield a set consisting of numbers and uppercase letters.

The InputMethodHints type is a typedef for QFlags<InputMethodHint>. It stores an OR combination of InputMethodHint values.

See also QGraphicsItem::inputMethodHints().

Implementations§

source§

impl InputMethodHint

source

pub fn to_int(&self) -> c_int

source§

impl InputMethodHint

source

pub const ImhNone: InputMethodHint = _

No hints. (C++ enum variant: ImhNone = 0)

source

pub const ImhHiddenText: InputMethodHint = _

The input method should not show the characters while typing. This is automatically set when setting QLineEdit::echoMode to Password. Note that setting ImhHiddenText does not change the echo mode. (C++ enum variant: ImhHiddenText = 1)

source

pub const ImhSensitiveData: InputMethodHint = _

Typed text should not be stored by the active input method in any persistent storage like predictive user dictionary. (C++ enum variant: ImhSensitiveData = 2)

source

pub const ImhNoAutoUppercase: InputMethodHint = _

The input method should not try to automatically switch to upper case when a sentence ends. (C++ enum variant: ImhNoAutoUppercase = 4)

source

pub const ImhPreferNumbers: InputMethodHint = _

Numbers are preferred (but not required). (C++ enum variant: ImhPreferNumbers = 8)

source

pub const ImhPreferUppercase: InputMethodHint = _

Upper case letters are preferred (but not required). (C++ enum variant: ImhPreferUppercase = 16)

source

pub const ImhPreferLowercase: InputMethodHint = _

Lower case letters are preferred (but not required). (C++ enum variant: ImhPreferLowercase = 32)

source

pub const ImhNoPredictiveText: InputMethodHint = _

Do not use predictive text (i.e. dictionary lookup) while typing. (C++ enum variant: ImhNoPredictiveText = 64)

source

pub const ImhDate: InputMethodHint = _

The text editor functions as a date field. (C++ enum variant: ImhDate = 128)

source

pub const ImhTime: InputMethodHint = _

The text editor functions as a time field. (C++ enum variant: ImhTime = 256)

source

pub const ImhPreferLatin: InputMethodHint = _

Latin characters are preferred (but not required). (C++ enum variant: ImhPreferLatin = 512)

source

pub const ImhMultiLine: InputMethodHint = _

Multiple lines can be entered into the text field. (C++ enum variant: ImhMultiLine = 1024)

source

pub const ImhDigitsOnly: InputMethodHint = _

Only digits are allowed. (C++ enum variant: ImhDigitsOnly = 65536)

source

pub const ImhFormattedNumbersOnly: InputMethodHint = _

Only number input is allowed. This includes decimal point and minus sign. (C++ enum variant: ImhFormattedNumbersOnly = 131072)

source

pub const ImhUppercaseOnly: InputMethodHint = _

Only upper case letter input is allowed. (C++ enum variant: ImhUppercaseOnly = 262144)

source

pub const ImhLowercaseOnly: InputMethodHint = _

Only lower case letter input is allowed. (C++ enum variant: ImhLowercaseOnly = 524288)

source

pub const ImhDialableCharactersOnly: InputMethodHint = _

Only characters suitable for phone dialing are allowed. (C++ enum variant: ImhDialableCharactersOnly = 1048576)

source

pub const ImhEmailCharactersOnly: InputMethodHint = _

Only characters suitable for email addresses are allowed. (C++ enum variant: ImhEmailCharactersOnly = 2097152)

source

pub const ImhUrlCharactersOnly: InputMethodHint = _

Only characters suitable for URLs are allowed. (C++ enum variant: ImhUrlCharactersOnly = 4194304)

source

pub const ImhLatinOnly: InputMethodHint = _

Only latin based input is allowed. (C++ enum variant: ImhLatinOnly = 8388608)

source

pub const ImhExclusiveInputMask: InputMethodHint = _

This mask yields nonzero if any of the exclusive flags are used. (C++ enum variant: ImhExclusiveInputMask = -65536)

source

pub const ImhNoEditMenu: InputMethodHint = _

Do not use built-in edit menu. This flag was introduced in Qt 5.11. (C++ enum variant: ImhNoEditMenu = 2048)

source

pub const ImhNoTextHandles: InputMethodHint = _

Do not use built-in text cursor and selection handles. This flag was introduced in Qt 5.11. (C++ enum variant: ImhNoTextHandles = 4096)

Trait Implementations§

source§

impl<T: Into<QFlags<InputMethodHint>>> BitOr<T> for InputMethodHint

§

type Output = QFlags<InputMethodHint>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: T) -> QFlags<InputMethodHint>

Performs the | operation. Read more
source§

impl Clone for InputMethodHint

source§

fn clone(&self) -> InputMethodHint

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InputMethodHint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<InputMethodHint> for QFlags<InputMethodHint>

source§

fn from(value: InputMethodHint) -> Self

Converts to this type from the input type.
source§

impl From<InputMethodHint> for c_int

source§

fn from(value: InputMethodHint) -> Self

Converts to this type from the input type.
source§

impl From<i32> for InputMethodHint

source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
source§

impl PartialEq for InputMethodHint

source§

fn eq(&self, other: &InputMethodHint) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for InputMethodHint

source§

impl Eq for InputMethodHint

source§

impl StructuralEq for InputMethodHint

source§

impl StructuralPartialEq for InputMethodHint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.