clear qlayout

C++
for(int i=0; i<my_layout->count(); i++){
	delete my_layout->itemAt(i);
}
Source

Also in C++: