|
Qt Components Hildon
0.20
QML components for Maemo5 with Hildon styling.
|
Provides a drop-down list functionality. More...
Signals | |
| void | selected (string text) |
| Emitted when the user selects an item in the combo box. | |
Public Member Functions | |
| int | findText (string text) |
| Finds and returns the index of a given text. | |
| bool | insertItem (int index, string text) |
| Inserts text at the specified index. | |
| bool | insertItems (int index, stringlist list) |
| Inserts list at the specified index. | |
| bool | removeItem (int index) |
| Removes the item at index. | |
| bool | replaceItem (int index, string text) |
| Replaces the item at index with text. | |
| string | textAt (int index) |
| Returns the text for a given index. | |
Properties | |
| int | count |
| The number of items in the combo box. | |
| int | currentIndex |
| The index of the currently selected item in the combo box. | |
| string | currentValueText |
| The text of the currently selected item in the combo box. | |
| bool | editable |
| Whether the combo box can be edited by the user. | |
| string | editText |
| The text being manipulated by the user for an editable combo box. | |
| enumeration | insertPolicy |
| The policy used to determine how new strings should be inserted in an editable combo box. | |
| int | maximumCount |
| The maximum number of items allowed in the combo box. | |
| variant | model |
| The model to populate the combo box from. | |
| ComboBoxStyle | style |
| Used to provide styling properties for the combo box. | |
| string | textRole |
| The model role used for displaying text the combo box items. | |
| Validator | validator |
| The text validator for an editable combo box. | |
Provides a drop-down list functionality.
| int ComboBox::findText | ( | string | text | ) |
Finds and returns the index of a given text.
| text |
If no match is found, -1 is returned. The search is case sensitive.
| bool ComboBox::insertItem | ( | int | index, |
| string | text | ||
| ) |
Inserts text at the specified index.
| index | |
| text |
Returns true if text is successfully inserted.
| bool ComboBox::insertItems | ( | int | index, |
| stringlist | list | ||
| ) |
Inserts list at the specified index.
| index | |
| list |
Returns true if list is successfully inserted.
| bool ComboBox::removeItem | ( | int | index | ) |
Removes the item at index.
| index |
Returns true if the item is successfully removed.
| bool ComboBox::replaceItem | ( | int | index, |
| string | text | ||
| ) |
Replaces the item at index with text.
| index | |
| text |
Returns true if the item is successfully replaced.
| string ComboBox::textAt | ( | int | index | ) |
Returns the text for a given index.
| index |
If an invalid index is provided, null is returned
| bool ComboBox::editable |
Whether the combo box can be edited by the user.
The default value is false.
| enumeration ComboBox::insertPolicy |
The policy used to determine how new strings should be inserted in an editable combo box.
The possible values are:
| Name | Description |
|---|---|
| InsertPolicy.NoInsert | The string will not be inserted. |
| InsertPolicy.InsertAtTop | The string will be inserted as the first item. |
| InsertPolicy.InsertAtCurrent | The current item will be replaced. |
| InsertPolicy.InsertAtBottom | The string will be inserted after the last item (default). |
| InsertPolicy.InsertAfterCurrent | The string will be inserted after the current item. |
| InsertPolicy.InsertBeforeCurrent | The string will be inserted before the current item. |
| InsertPolicy.InsertAlphabetically | The string will be inserted in alphabetic order. |
| int ComboBox::maximumCount |
The maximum number of items allowed in the combo box.
The default value is Number.MAX_VALUE.
| variant ComboBox::model |
The model to populate the combo box from.
The default model is an empty array.
1.8.1.2