Описание тега qcombobox

QComboBox is a Qt class that implements a standard combo-box, which is a list of elements that can contract to occupy less screen space, and expand to show all of the options.

In it's "closed" view, the QComboBox displays the current selection. It can also pop-up to show all of the choices, and can as well be user-editable.

QComboBox can be operated dynamically to insert (with insertItem() and insertItems() functions), remove (removeItem()), and clear (clear()) items.

One can also get the current item's index and text.

An example of creating a QComboBox and showing it will look like this:

//creating the combobox with no parent, so it appears in a new window.
QComboBox * b = new QComboBox();
//Inserting 3 elements into it. 
b->insertItems(0, QStringList() << "item1" << "item2" << "item3");
//Showing the ComboBox.
b->show();

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.