Delete content widget in layout
Hi
I'm trying to delete a widget or several widgets content in a QBoxLayout. How can I do this?
This is my code:
Code:
void CustomRadioButton::deleteOption(int pos)
{
if(pos >= 0 && pos < getLayout()->count())
{
delete getLayout()->takeAt(pos);
update();
}
}
I think I managed to delete the widget, but the layout do not updated visually. Any idea??
Thanks in advanced and excuse my English.
Re: Delete content widget in layout
from the docs :
http://doc.qt.nokia.com/4.7/qboxlayout.html
QBoxLayout Class Reference says :
To remove a widget from a layout, call removeWidget(). Calling QWidget::hide() on a widget also effectively removes the widget from the layout until QWidget::show() is called.
So it's there already.
Have fun.
everall