[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    RE: [PyQt] Completely removing items from a layout
From:       Lee Harr <missive () hotmail ! com>
Date:       2009-11-28 18:42:35
Message-ID: SNT106-W242B01FCBF99C2E22B182CB1990 () phx ! gbl
[Download RAW message or body]


> you need to delete both the layouts and their contents:
> 
> def unfill(self):
> def deleteItems(layout):
> if layout is not None:
> while layout.count():
> item = layout.takeAt(0)
> widget = item.widget()
> if widget is not None:
> widget.deleteLater()
> else:
> deleteItems(item.layout())
> deleteItems(self.ui.verticalLayout)


Brilliant. Thanks!

 		 	   		  
_________________________________________________________________
Keep your friends updated—even when you’re not signed in.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010
 _______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic