<div dir="ltr"><br>I have a QFrame with a QVBoxLayout as it's layout. The layout has a QLabel, then anywhere from 0 - 5 QHBoxLayouts in it followed by a QSpacerItem to push everybody to the top. The problem I'm having is that when I use removeItem for the top QHBoxLayout, it does not erase the contents of the QHBoxLayout. The remaining ones will move up and fill in the old location with the background, but the background won't fill in the removed item's space. Here is the code I'm trying now, (I added some del item lines to try to help, I even try hide and reshowing)<br>
<br> item = self.ListLayout.itemAt(1)<br> if not isinstance(item, QSpacerItem):<br> print "removing:", item<br> lo = item.layout()<br> while True:<br> i=lo.takeAt(0)<br>
print "item:", i<br> if i is None : break<br> del i<br> self.ListLayout.removeItem(item)<br> del lo<br> del item<br> self.ListFrame.hide()<br>
self.ListFrame.show()<br><br>Please provide some insight.<br><br>Thanks,<br clear="all"><br>-- <br>Doug Nichols<br><a href="mailto:doug16@gmail.com">doug16@gmail.com</a><br><a href="http://dnwnichols.home.comcast.net/">http://dnwnichols.home.comcast.net/</a><br>
</div>