Combo boxes are used for getting input from the user with an applied constraint; that is, the user will be shown certain options in the form of a popup list and he/she can only select from the available choices. A combo box takes less space when compared with
. The List
WidgetQComboBox
class is used for displaying combo boxes. Not only can you display text through a combo box, butpixmaps
too. Here are the methods provided by theQComboBox
class:
Method | Usage |
| Sets or changes the text of the item in the combo box. |
| Removes the specific item from the combo box. |
| Removes all items from the combo box. |
| Returns the text of the current item, that is, the item that is currently chosen. |
| Sets the current index of the combo box, that is, it sets the desired item in the combo box as the currently chosen item. |
| Returns the count of the items in the combo box. |
| Sets the maximum number of items that are allowed... |