This doesn\'t seem easy. Basically, I add QPushButtons through a function to a layout, and when the function executes, I want to clear the layout first (removi
QPushButton
only works for my buttonlist, if the widgets themeselves are deleted, too. otherwise the old buttons are still visible:
QLayoutItem* child; while ((child = pclLayout->takeAt(0)) != 0) { if (child->widget() != NULL) { delete (child->widget()); } delete child; }