-3

Tell me please how to make an expandable QGroupBox depending on the information and so that it does not appear at the very beginning of the QScrollArea, but only when I start to reduce the width. how to find the width of qGroupBox given what is hidden in qScroll

enter image description here

Area

I read about resizeEvent, but I understand where to use it...

Pamputt
  • 173
  • 1
  • 11
  • Are you looking for [horizontalScrollBarPolicy](https://doc.qt.io/qt-6/qabstractscrollarea.html#horizontalScrollBarPolicy-prop), [verticalScrollBarPolicy](https://doc.qt.io/qt-6/qabstractscrollarea.html#verticalScrollBarPolicy-prop)? – Scheff's Cat Aug 30 '23 at 08:07
  • 1
    The size of the `QGroupBox` (of course) depends on its contents - specifically whether / what [QLayout](https://doc.qt.io/qt-6/qlayout.html#details) you have used to arrange its contents. – Scheff's Cat Aug 30 '23 at 08:09
  • 1
    You could try to call [`QWidget::adjustSize()`](https://doc.qt.io/qt-6/qwidget.html#adjustSize) on your `QGroupBox`. – Fareanor Aug 30 '23 at 08:10
  • there should be no scrolling when starting the program. the widget should dynamically expand. but when I start resizing the widget, a scroll appears. thanks for the help – Nagato Fujirama Aug 30 '23 at 17:55
  • i tried to use policy, adjustsize – Nagato Fujirama Aug 30 '23 at 17:55

0 Answers0