Re: Problem with sorting ColumnView

2022-08-23 Thread Jackson Campolattaro via gtkmm-list
Thanks! Somehow I got the impression that the ColumnView would construct SortListModels on its own, but looking back at the documentation I'm not sure where I heard that. Here is a working solution: #include > #include > > class MyWindow : public Gtk::Window { > private: > > Gtk::ColumnView

Re: Problem with sorting ColumnView

2022-08-23 Thread Andrew Potter via gtkmm-list
The documentation at https://docs.gtk.org/gtk4/method.ColumnView.get_sorter.html suggests you need a SortListModel On Tue, Aug 23, 2022 at 4:32 AM Jackson Campolattaro via gtkmm-list < gtkmm-list@gnome.org> wrote: > Hello, > > I'm trying to use the Gtk ColumnView to show a custom ListModel in sor

Problem with sorting ColumnView

2022-08-23 Thread Jackson Campolattaro via gtkmm-list
Hello, I'm trying to use the Gtk ColumnView to show a custom ListModel in sorted order. I noticed that when I set a simple sorter for a column and then sort by that column, the order isn't changed. The UI allows me to switch between ascending and descending, but doing so doesn't reverse the list.