this also doesnot solve my problem...
i am posting a sample code... hope it will help ..
first i am adding a widget to the QGridlayout layout using the following lines.
then removing that widget and updating and deleting the gridlayout.
here i am trying to set the new gridlayout on screen
if i do like this the layout recently set appears over the old one...