here is my code:

QPushButton* button = new QPushButton;
button.setParent(&window); // button appear on window
button.setParent(NULL); // button disappear on window
button.setParent(&window); // button appear on window again

when I setParent(&window) again, I realize that the button were not release by setParent(NULL).

My question is, if I not setParent(&window) again, when button release himself, now it leave from his parent!