15 #ifndef BORNAGAIN_GUI_VIEW_TOOL_LAYOUTUTILS_H
16 #define BORNAGAIN_GUI_VIEW_TOOL_LAYOUTUTILS_H
28 void clearLayout(QLayout* layout,
bool deleteWidgets =
true);
31 void removeRow(QGridLayout* layout,
int row,
bool deleteWidgets =
true);
34 void removeColumn(QGridLayout* layout,
int column,
bool deleteWidgets =
true);
Utility functions to add/remove widgets to the layout on the fly. Taken from https://stackoverflow....
void removeColumn(QGridLayout *layout, int column, bool deleteWidgets=true)
Removes column from grid layout.
void removeRow(QGridLayout *layout, int row, bool deleteWidgets=true)
Removes row from grid layout (important: doesn't change row count).
QWidget * placeHolder()
Returns empty widget to occupy place in layout.
void clearLayout(QLayout *layout, bool deleteWidgets=true)
Removes content from box layout.
void clearGridLayout(QGridLayout *layout, bool deleteWidgets=true)
Clear layout completely.