PDA

View Full Version : show full content QDockWidget with QScrollArea



junior-root
27th May 2017, 12:34
Hello.
I have a floating QDockWidget that hold a QWidget (QDockWidget::setWidget(QWidget * widget).
This QWidget hold a QToolBar and a QScrollArea grouped into a QVBoxLayout.

I want to resize QDockWidget to show full content.
For this I need that QScrollArea show full content too, without needing scroolbars.
How can I do that?



+------------------------+
| QDockWidget |
| +-------------------+ |
| | QWidget | |
| | QVBoxLayout | |
| | QToolBar | |
| | +-------------+ | |
| | | QScrollArea | | |
| | | +---------+ | | |
| | | | QWidget | | | |
| | | +---------+ | | |
| | +-------------+ | |
| | | |
| +-------------------+ |
+------------------------+

Santosh Reddy
29th May 2017, 07:31
...For this I need that QScrollArea show full content too, without needing scroolbars....
Then don't QScrollArea at all, just put QToolBar and QWidget in QVBoxLayout.