How to add combobox inside a GtkTreeView with GtkCellRendererCombo

adb1805e067c29913fb50b95da253d64.png
1. create a
GtkTreeViewColumn
with renderer
GtkCellRendererCombo
;
2. create a
GtkListStore
with values of combobox;
3. change renderer to editable with
GtkCellRendererCombo::set_property('editable', TRUE)
;
4. add model to combobox with
GtkCellRendererCombo::set_property('model', $model)
;
5. tell to the combobox what column of model will be displayed with
GtkCellRendererCombo::set_property('text-column', 0)
;
6. remove entry widget of combobox when editing with
GtkCellRendererCombo::set_property('has-entry', FALSE)
;
7. change renderer to editable with
GtkCellRendererCombo::set_property('editable', TRUE)
;
8. connect the renderer to signal edited, to be called when select a new value from combobox;
9. get
GtkTreeView
model, and set the new value;