[pygtk] problem with listStore append in a treeview
Petsas Athanasios
petsas at csd.uoc.gr
Thu Oct 29 02:49:59 WST 2009
You are right! I try your code with my list and is is very slowly, and
that's because the
iteration of my list is slowly. The objects that the list has is SOAPpy
objects I guess. I
haven't done the implementation of the objects etc. What I have to do is the
graphical
interface for that application... So thank you all.. That was my fault. i
will see what can I do...
On Wed, Oct 28, 2009 at 8:20 PM, John Stowers
<john.stowers.lists at gmail.com>wrote:
> On Wed, 2009-10-28 at 20:12 +0200, Petsas Athanasios wrote:
> > about 2 minutes is required for a treeview of 83 rows! :(
>
> The following took 0.0 seconds. I think you need to post more of your
> code. I would not be surprised if the slowdown was coming from
> elsewhere.
>
> John
>
> import gtk
>
> tv = gtk.TreeView()
> ls = gtk.ListStore(str, int)
>
> tv.append_column(gtk.TreeViewColumn('A', gtk.CellRendererText(),
> text=0))
> tv.append_column(gtk.TreeViewColumn('B', gtk.CellRendererText(),
> text=1))
>
> for i in range(100):
> ls.append( ("FOO%d" % i, i) )
> tv.set_model(ls)
>
> w = gtk.Window()
> w.add(tv)
>
> w.show_all()
> gtk.main()
>
> >
> > On Wed, Oct 28, 2009 at 7:42 PM, John Stowers
> > <john.stowers.lists at gmail.com> wrote:
> >
> > >
> > > from taken from this page:
> > > http://faq.pygtk.org/index.py?req=show&file=faq13.043.htp
> > > but it's still slow!
> >
> >
> > How slow? How are you measuring the speed?
> >
> > John
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20091028/1133abac/attachment.htm
More information about the pygtk
mailing list