![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Shared helper for the "content scrolls, dialog shrinks" pattern. More...
#include <QFrame>#include <QScrollArea>#include <QWidget>Go to the source code of this file.
Namespaces | |
| namespace | OpenSWMM |
| namespace | OpenSWMM::Ui |
Functions | |
| QScrollArea * | OpenSWMM::Ui::wrapInScrollArea (QWidget *content, QWidget *parent=nullptr) |
Wrap content in a frameless, resizable QScrollArea. | |
Variables | |
| constexpr int | OpenSWMM::Ui::kSpinMinWidthPx = 110 |
| constexpr int | OpenSWMM::Ui::kComboMinWidthPx = 140 |
Shared helper for the "content scrolls, dialog shrinks" pattern.
Properties / styling panels build their controls into a plain
QVBoxLayout, so when the dock or dialog is dragged below the content's
natural size Qt squeezes the children (zero-width combos, clipped
labels). Wrapping the content in a frameless, resizable QScrollArea
lets the content hold its minimum size and scroll instead — matching
layerstylingdock.cpp and swmm2dresultsstylepanel.cpp, which already
do this. One helper, reused, rather than re-deriving the lambda.