[PyKDE] Dynamic layouts

Phil Thompson phil at river-bank.demon.co.uk
Sat Mar 17 02:57:29 GMT 2001


Boudewijn Rempt wrote:
> 
> On Wednesday 14 March 2001 07:16, I wrote:
> > I haven't found a way to really delete individual widgets from a layout,
> > yet, but as long as you keep an explicit reference to the middle layout
> you
> > can call self.layout.deleteAllItems() and then add new items, I think.
> >
> > I haven't tried it myself yet, but will play a bit. By coincidence, I'm
> > just now writing up a bit on Qt layouts, so it's an interesting
> question.
> > ;-)
> 
> Well, I've been working on it today. Still no way to delete the widgets,
> but
> adding is easy. Take a look at the following script:

Have you tried using Qobject.removeChild()?

Phil




More information about the PyQt mailing list