Hi,

I've used the following code snippet to add scroll area inside dock widget

Qt Code:
  1. QDockWidget *m_pMapInfoWidget = new QDockWidget(this);
  2. m_pMapInfoWidget->setObjectName(QStringLiteral("Map Info Widget"));
  3.  
  4. m_pMapInfoWidget->setFeatures(QDockWidget::NoDockWidgetFeatures);
  5. m_pMapInfoWidget->setAllowedAreas(Qt::RightDockWidgetArea);
  6. m_pMapInfoWidget->setMinimumSize(285, 500);
  7.  
  8. addDockWidget(Qt::RightDockWidgetArea, m_pMapInfoWidget);
  9.  
  10. // Create scroll area for the widget
  11. QScrollArea *m_pMapInfoScrollArea = new QScrollArea();
  12. m_pMapInfoScrollArea->setObjectName(QStringLiteral("MapInfoScrollArea"));
  13. m_pMapInfoScrollArea->setWidgetResizable(true);
  14. m_pMapInfoScrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
  15. m_pMapInfoScrollArea->setFrameStyle(QFrame::NoFrame);
  16. m_pMapInfoScrollArea->show();
  17.  
  18. // Scroll area content
  19. QWidget *m_pInfoContent = new QWidget();
  20. m_pInfoContent->setObjectName(QStringLiteral("InfoContent"));
  21.  
  22. QGroupBox *m_pGPSGroupBox = new QGroupBox(m_pInfoContent);
  23. m_pGPSGroupBox->setObjectName(QStringLiteral("GPSGroupBox"));
  24. m_pGPSGroupBox->setFont(infoFont);
  25.  
  26. m_pGPSGroupBox->setTitle("Heading");
  27. m_pGPSGroupBox->setGeometry(QRect(3, 20, 270, 170));
  28.  
  29.  
  30. QLabel *m_pLatLabel = new QLabel(m_pGPSGroupBox);
  31. m_pLatLabel->setObjectName(QStringLiteral("LatLabel"));
  32. m_pLatLabel->setGeometry(QRect(20, 30, 51, 16));
  33. m_pLatLabel->setFont(infoFont);
  34. m_pLatLabel->setText("Latitude");
  35.  
  36. m_pMapInfoScrollArea->setWidget(m_pInfoContent);
  37. m_pMapInfoWidget->setWidget(m_pMapInfoScrollArea);
To copy to clipboard, switch view to plain text mode 

When executing the above code we are getting a scroll area, but there is no scroll bar in it.
When i resize the window, we are not getting the scroll bar.
Kindly help us to resolve this.