]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #18096(Tuleap): Make property panel controls on a scroll panel based
authorvsv <vsv@opencascade.com>
Mon, 18 Nov 2019 14:33:12 +0000 (17:33 +0300)
committervsv <vsv@opencascade.com>
Mon, 18 Nov 2019 14:33:12 +0000 (17:33 +0300)
src/XGUI/XGUI_PropertyPanel.cpp

index 4138cc25cdc39eddadbbe8021d49755e7e715dbd..24bd52b94f87a432032bdbce3762a6b43e90bc1f 100644 (file)
@@ -53,6 +53,7 @@
 #include <QGridLayout>
 #include <QWidget>
 #include <QAction>
+#include <QScrollArea>
 
 #ifdef _DEBUG
 #include <iostream>
@@ -75,12 +76,18 @@ XGUI_PropertyPanel::XGUI_PropertyPanel(QWidget* theParent, XGUI_OperationMgr* th
   setObjectName(PROP_PANEL);
   setStyleSheet("::title { position: relative; padding-left: 5px; text-align: left center }");
 
-  QWidget* aContent = new QWidget(this);
+  QScrollArea* aScroll = new QScrollArea(this);
+  aScroll->setWidgetResizable(true);
+  aScroll->setFrameStyle(QFrame::NoFrame);
+
+  QWidget* aContent = new QWidget(aScroll);
   QGridLayout* aMainLayout = new QGridLayout(aContent);
   const int kPanelColumn = 0;
   int aPanelRow = 0;
   aMainLayout->setContentsMargins(3, 3, 3, 3);
-  setWidget(aContent);
+  aScroll->setWidget(aContent);
+
+  setWidget(aScroll);
 
   QFrame* aFrm = new QFrame(aContent);
   aFrm->setFrameStyle(QFrame::Raised);
@@ -184,6 +191,7 @@ void XGUI_PropertyPanel::setModelWidgets(const QList<ModuleBase_ModelWidget*>& t
   }
 }
 
+
 const QList<ModuleBase_ModelWidget*>& XGUI_PropertyPanel::modelWidgets() const
 {
   return myWidgets;