diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx
index 155537e1af1b74e5fa8169c31dfb7349f4031f85..55993f9a5ddfec0dbbaa79b3ca99338c130a9899 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx
@@ -68,11 +68,11 @@ void QtWidgetView::CreateGui()
   QGroupBox *mainGroup = new QGroupBox();
   mainGroup->setLayout(mainLayout);
 
-  QVBoxLayout  *mainLayout = new QVBoxLayout();
-  mainLayout->addWidget(mainGroup);
+  QVBoxLayout  *finalLayout = new QVBoxLayout();
+  finalLayout->addWidget(mainGroup);
 
-  // Make the scroll layout the main layout
-  this->setLayout(mainLayout);
+  // Make the final layout to the widget
+  this->setLayout(finalLayout);
 }