View Full Version : Remove widget from layout
Archa4
17th February 2011, 11:04
So i have a layout. I added many different widgets to it. But i want to know, how do i remove a widget from layout? I tried:
layout->removeWidget(returnButton);
Program compiles and everything, but when the time comes - the widget does not disappear... help?
nish
17th February 2011, 11:55
to remove the widget to need to re-parent it or delete it or just hide() it.
Archa4
17th February 2011, 12:00
Hm.. i need to use it later, so i think i'll have to use hide()...
BalaQT
17th February 2011, 12:00
So i have a layout. I added many different widgets to it. But i want to know, how do i remove a widget from
layout? I tried:
layout->removeWidget(returnButton);
Program compiles and everything, but when the time comes - the widget does not disappear... help?
hi,
try returnButton->setParent(0);
Bala
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.