How to update gtk.liststore?

http://img824.imageshack.us/i/capturadetelag.png/

How to update gtk.liststore?

I mean a random number of times per second on a column, as an example, such as a list of the download manager, I would like to have a simple example to find out how this Liststore works to update the list, because I cannot find an effective way to do that- something like:

store.append (songs1, songs2, songs3)

store.update (songs3, ['Foobar']).

+3
source share
2 answers

You can iterate through the rows in the list store ( for row in liststore:...), as well as through the columns (values) in each row ( for col_value in row:...).

For simple, direct updates:

row_n = 0
col_n = 2
liststore[row_n][col_n] = 'new value'

gtk.TreeIter (row_iter):

liststore.set_value(row_iter, col_n, 'new value')
+7

Source: https://habr.com/ru/post/1751558/


All Articles