2010/3/18 Julián Alarcón <[email protected]>:
> Hi guys, I don't know if this is the right place to bother you with
> this support ask.
>
> I'm making a little app that takes data from PostgreSQL and show it on
> a TreeView. But, I need to update the data every 5 minutes, but I
> don't know how to make this. I tried some while loops but the window
> didn't appear.
>
> This is the code: http://paste.ubuntu.com/397321/
>
> And this is a little screenshot: http://i42.tinypic.com/14yaazs.jpg
>
> Thanks!
> _______________________________________________
> pygtk mailing list [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
You can use the gobject.timeout_add function to update your treeview.
Something like that:
def __init__(self):
....
gobject.timeout_add(300000, self.refresh_treeview)
def refresh_treeview(self):
#reload your data and refresh the treeview here
return True
--
Simon Vermeersch
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/