Visa träd

While the deprecated TreeView provided built-in support for trees, the list widgets, and in particular Gio::ListModel, do not. However, gtkmm provides functionality to make trees look and behave like lists for the people who still want to display lists. This is achieved by using the TreeListModel to flatten a tree into a list. The TreeExpander widget can then be used inside a listitem to allow users to expand and collapse rows.

Referens för TreeListModel

Referens för TreeExpander

Exempel

TreeListModel

Källkod