Description
What's the problem this feature will solve?
MEDM widgets are placed by absolute positioning. MEDM users are accustomed to changing the screen size and the widgets will stretch accordingly. In Qt, the stretchable feature is provided by a layout manager which re-positions its widgets as the layout changes size.
The widgets from the adl2pydm
converter are not stretchable and this is a popular feature that is missed in MEDM screens converted for use in PyDM.
Describe the solution you'd like
Internal widgets proportionally should stretch as the window changes size. (note: These example screens are rendered with caQtDM, a C++/Qt application, showing the idea is possible in Qt.)
Additional context
After some research, it seems a good candidate case for a Qt Custom Layout Manager. The new custom layout would accept widgets placed in absolute coordinates and then adjust the geometry (x,y,h,w) of each to fit the containing QFrame.
The PyDM project already has an existing custom layout manager (FlowLayout()
) that would be a good example for a new layout manager for this feature:
pydm/pydm/widgets/template_repeater.py
Lines 17 to 112 in 5740b1a
The adl2pydm
converter would use this new layout for each of the MEDM screens it converts.