From 7ee15d997ef623a0f6431f7d06af2dc08e41b3cd Mon Sep 17 00:00:00 2001 From: Cyrille Valladeau <cyrille.valladeau@c-s.fr> Date: Wed, 26 Oct 2011 16:10:00 +0200 Subject: [PATCH] ENH: no more general scroll widget --- .../QtWidget/otbWrapperQtWidgetView.cxx | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx index b11c1875b6..155537e1af 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx @@ -68,25 +68,24 @@ void QtWidgetView::CreateGui() QGroupBox *mainGroup = new QGroupBox(); mainGroup->setLayout(mainLayout); - // Put the main group inside a scroll area - QScrollArea *scrollArea = new QScrollArea; - scrollArea->setWidget(mainGroup); - scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); - scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); - scrollArea->setWidgetResizable(true); - - QVBoxLayout *scrollLayout = new QVBoxLayout(); - scrollLayout->addWidget(scrollArea); + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->addWidget(mainGroup); // Make the scroll layout the main layout - this->setLayout(scrollLayout); + this->setLayout(mainLayout); } QWidget* QtWidgetView::CreateInputWidgets() { - QtWidgetParameterBase* params = QtWidgetParameterFactory::CreateQtWidget(m_Model->GetApplication()->GetParameterList(), m_Model); - return params; + QScrollArea *scrollArea = new QScrollArea; + // Put the main group inside a scroll area + scrollArea->setWidget(QtWidgetParameterFactory::CreateQtWidget(m_Model->GetApplication()->GetParameterList(), m_Model)); + scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); + scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + scrollArea->setWidgetResizable(true); + + return scrollArea; } -- GitLab