Ross Burton wrote:
On Mon, 2005-05-23 at 10:27 +0200, A.T.Hofkamp wrote:

It is probably my Qt background that steered me in the wrong direction. There, a base class Widget is used to derive new widgets. I was looking for something similar but could not find it. Also, the tutorial didn't show how to do this.


The base UI object in PyGTK is gtk.Widget...

I tried that one too, but like 'Container', Widget is an abstract (non-instantiable) class, so it is of very little use in pygtk. (not sure whether that should be considered a problem though, at first sight it seems not, at least for application programming).


I am quite happy with the use of a concrete container class as base for my Gantt chart widget. It seems like a sensible solution to me. If only I had discovered this before the weekend instead of after it.... :-)

The Qt solution has the advantage that I can start rendering graphics directly in the derived class by overriding paintEvent() . On the other hand, pygtk has the advantage that there is a clear seperation between containers and drawables.



Albert

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to