I'm using Python3 and Gtk+3. When I add a new row to my Gtk.TreeView, these are always appended at the end. I want whenever I add a new row to set the cursor on it. I know I have to use the "set_cursor()" function, or at least I think so. However, I don't know how to retrieve the path of the row.
I am using the signal size-allocate, which tells me when there are changes in my Gtk.TreeView.
self.treeview.connect('size-allocate', self.on_treeview_size_changed)
def on_treeview_size_changed(self, widget, allocation):
self.treeview.set_cursor(path, None, False)
Any ideas how can I retrieve the path of the last row or make what I am trying to do happen?