Show icon or color in Gtk TreeView tree

前端 未结 3 887
自闭症患者
自闭症患者 2021-01-14 15:37

I am having difficulty loading a file or displaying a colour in one of the columns of a Gtk TreeView (Python binding of GTK3). An example taken from QGIS shows a icon in the

3条回答
  •  生来不讨喜
    2021-01-14 15:59

    Apparently all I was missing was "pixbuf = 0" indicating that the pixbuf is in the 0th column. This line of the example needs to be modified:

        px_column = Gtk.TreeViewColumn("Icon", px_renderer, pixbuf=0)
    

提交回复
热议问题