WComboBox is a MVC class (model-view-controller). By default a
WStringListModel is used. With this model you can associate a
single column of data to the displayed items. The member methods
addItem(), insertItem() and removeItem()
manipulate the model. You can set the model with setModel().
Item models support different roles like
Wt::ItemDataRole::UserRole. The text for an item in the
drop-down box is associated with a
Wt::ItemDataRole::DisplayRole. Typically, you will associate the
underlying "value" with a Wt::ItemDataRole::UserRole). In this
way, you can also add additional user roles.
Note that there are still other models like WFormModel which
and can be used to represent fields in a form.