How to detect when GtkTreeView was selected

c63441f661fc7a334894ba854569eb76.png
1. create
GtkTreeView
with the
GtkTreeViewColumn
and
GtkCellRendererText
as normal;
2. get the
GtkTreeSelection
from
GtkTreeView
;
3. connect the
GtkTreeSelection
to the
changed
signal;
4. in the callback, get the
GtkTreeModel
and
GtkTreeIter
from selection with
GtkTreeSelection::get_selected()
;
5. now you can get or set values from model;