[PyQt] Clear/delete widget in a Layout
starglider.dev at gmail.com
Wed Aug 18 23:51:14 BST 2010
thank you all of you for your help, I solve my problem with Matteo code.
On 9 August 2010 10:00, Matteo Bertozzi <th30z at develer.com> wrote:
> On Sun, 2010-08-08 at 23:59 +0100, starglider develop wrote:
> > Hi,
> > I have a layout and need to remove all the widgets in the layout
> > to populate with other widget,
> > but didn't find a way of doing that.
> > Any ideas.
> def clearLayout(layout):
> while layout.count() > 0:
> item = layout.takeAt(0)
> if not item:
> w = item.widget()
> if w:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt