I'm developing an application using Quickly. I have a Gtk.TreeView with a Gtk.ListStore as its model. The selection mode of the Gtk.SelectionMode is set to Gtk.SelectionMode.MULTIPLE.
The problem is that the Gtk.SelectionMode does not behave as it should:
- Only one row can be selected at a time.
- Impossible to select multiple rows using the Ctrl or Shift key.
- Once a row is selected, it can't be deselected using the Ctrl key.
- Nothing happens when I press the arrow keys.
The problem can be easily reproduced by creating a new Ubuntu application using Quickly (or you can download a test application below).
$ quickly create ubuntu-application test $ cd test $ quickly design
Create a TreeView with a ListStore as its model. Set the mode of the GtkTreeSelection to 'Multiple'. Add some columns and values to the ListStore. Add some TreeViewColumns with CellRendererTexts to the Treeview.
$ quickly run -v
Note you can't select multiple rows.
Some things I've already tried, but did not change anything:
Setting the selection mode in the code.
Moving the GtkTreeSelection
<child>below the GtkTreeViewColumn
<child>in the UI file.
Deleting the GtkTreeSelection from the UI file and setting the selection with
Am I overlooking something obvious? Or could this be a bug?
On a side note, if you set the selection to 'Single', it's also not possible to deselect the row.
If you'd like to help me out, you can download a test application
here instead of creating a new project with Quickly on your own. Please note you need Quickly to run it.
$ cd test $ quickly run
I've implemented some callbacks for testing purposes in test/test/TestWindow.py. You can find the UI definition in test/data/ui/TestWindow.ui.