-bool ModuleBase_WidgetFactory::hasExpandingControls(QWidget* theParent)
-{
- bool result = false;
- QList<QWidget *> aListToCheck;
- aListToCheck << theParent;
- ModuleBase_ModelWidget* aModelWidget = qobject_cast<ModuleBase_ModelWidget*>(theParent);
- if(aModelWidget) {
- aListToCheck << aModelWidget->getControls();
- }
- foreach(QWidget* eachWidget, aListToCheck) {
- QSizePolicy::Policy aVPolicy = eachWidget->sizePolicy().verticalPolicy();
- if(aVPolicy & QSizePolicy::ExpandFlag) {
- result = true;
- }
- }
- return result;