Salome HOME
Parameters management implementation
[modules/shaper.git] / src / ModuleBase / ModuleBase_PageWidget.cpp
index 135fe23b78b0e9de603917de390e4df36cd0d202..c351d0af404ae7b599281d618bc3bfb7fc784402 100644 (file)
@@ -9,14 +9,14 @@
 #include <ModuleBase_ModelWidget.h>
 #include <ModuleBase_Tools.h>
 
-#include <QGridLayout>
+#include <QLayout>
 
 #include <iostream>
 
 ModuleBase_PageWidget::ModuleBase_PageWidget(QWidget* theParent)
 : QFrame(theParent)
 {
-  myMainLayout = new QGridLayout(this);
+  myMainLayout = new QVBoxLayout(this);
   ModuleBase_Tools::adjustMargins(myMainLayout);
   setLayout(myMainLayout);
 }
@@ -27,15 +27,12 @@ ModuleBase_PageWidget::~ModuleBase_PageWidget()
 
 void ModuleBase_PageWidget::addPageStretch()
 {
-  myMainLayout->setRowStretch(myMainLayout->rowCount(), 1);
+  myMainLayout->addStretch(1);
 }
 
 void ModuleBase_PageWidget::placeModelWidget(ModuleBase_ModelWidget* theWidget)
 {
-  const int kCol = 0;
-  const int kRow = myMainLayout->count();
-  myMainLayout->addWidget(theWidget, kRow, kCol);
-  myMainLayout->setRowStretch(kRow, 0);
+  myMainLayout->addWidget(theWidget, 0);
 }
 
 void ModuleBase_PageWidget::placeWidget(QWidget* theWidget)
@@ -46,10 +43,7 @@ void ModuleBase_PageWidget::placeWidget(QWidget* theWidget)
     #endif
     return;
   }
-  const int kCol = 0;
-  const int kRow = myMainLayout->count();
-  myMainLayout->addWidget(theWidget, kRow, kCol);
-  myMainLayout->setRowStretch(kRow, 0);
+  myMainLayout->addWidget(theWidget, 0);
 }
 
 QLayout* ModuleBase_PageWidget::pageLayout()