diff options
author | BogDan Vatra <bogdan@kde.org> | 2015-07-06 16:08:06 +0300 |
---|---|---|
committer | BogDan Vatra <bogdan@kde.org> | 2015-08-26 07:02:35 +0000 |
commit | e660a4cbddc046802af8ef63fe40af45b7d80d9c (patch) | |
tree | 79e02fc2fe08bbac70c57e01c159bcdc5b6ab026 /src/controls/ComboBox.qml | |
parent | c4a911e564cfccfcd0c1e98a1baa8c25b91a085b (diff) | |
download | qtquickcontrols-e660a4cbddc046802af8ef63fe40af45b7d80d9c.tar.gz |
Android: Add inputMethodHints to ComboBox control
Task-number: QTBUG-39088
Change-Id: Iaf57e8c5e6b92b63564fb015c3b13602acfeae8b
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/ComboBox.qml')
-rw-r--r-- | src/controls/ComboBox.qml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index d0940772..af1ecfe0 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -145,6 +145,50 @@ Control { */ property alias editText: input.text + /*! \qmlproperty enumeration ComboBox::inputMethodHints + \since QtQuick.Controls 1.5 + Provides hints to the input method about the expected content of the combo box and how it + should operate. + + The value is a bit-wise combination of flags or \c Qt.ImhNone if no hints are set. + + Flags that alter behavior are: + + \list + \li Qt.ImhHiddenText - Characters should be hidden, as is typically used when entering passwords. + \li Qt.ImhSensitiveData - Typed text should not be stored by the active input method + in any persistent storage like predictive user dictionary. + \li Qt.ImhNoAutoUppercase - The input method should not try to automatically switch to upper case + when a sentence ends. + \li Qt.ImhPreferNumbers - Numbers are preferred (but not required). + \li Qt.ImhPreferUppercase - Upper case letters are preferred (but not required). + \li Qt.ImhPreferLowercase - Lower case letters are preferred (but not required). + \li Qt.ImhNoPredictiveText - Do not use predictive text (i.e. dictionary lookup) while typing. + + \li Qt.ImhDate - The text editor functions as a date field. + \li Qt.ImhTime - The text editor functions as a time field. + \endlist + + Flags that restrict input (exclusive flags) are: + + \list + \li Qt.ImhDigitsOnly - Only digits are allowed. + \li Qt.ImhFormattedNumbersOnly - Only number input is allowed. This includes decimal point and minus sign. + \li Qt.ImhUppercaseOnly - Only upper case letter input is allowed. + \li Qt.ImhLowercaseOnly - Only lower case letter input is allowed. + \li Qt.ImhDialableCharactersOnly - Only characters suitable for phone dialing are allowed. + \li Qt.ImhEmailCharactersOnly - Only characters suitable for email addresses are allowed. + \li Qt.ImhUrlCharactersOnly - Only characters suitable for URLs are allowed. + \endlist + + Masks: + + \list + \li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used. + \endlist + */ + property alias inputMethodHints: input.inputMethodHints + /*! This property specifies whether the combobox should gain active focus when pressed. The default value is \c false. */ property bool activeFocusOnPress: false |