You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The best approach I've found is to have layouts calculate their children's geometry assuming some sort of standard rectangle (Qt itself often starts with a 640x480 one when drafting a layout); offering height information based on this draft; then, when setGeometry() is called, if the resulting height (based on a potentially new width) doesn't match what the layout previously advertised, re-constraining by calling parent->setFixedHeight().
This allows you to use arbitrary widgets, and HFW widgets only need to support hasHeightForWidth() and heightForWidth() to have the new layouts (and their parent widgets, and any ancestor layouts using this mechanism) adjust their height.
It can lead to some redrawing, but often not too much, as it happens on a per-layout not per-widget basis.
So this would be a complete solution to Qt layout problem, but it would require a few steps.
Create a new repository cardinal-qtwidgets for Shiboken Python bindings to all of those layouts and widgets. LGPL license. Depends on Qt.
Create a new repository pyedifice-cardinal-elements for Edifice Base Elements for all of those layouts and widgets. Depends on Qt and cardinal-qtwidgets and pyedifice. LGPL license.
The text was updated successfully, but these errors were encountered:
Rudolf Cardinal appears to have a real solution for the Label layout problem.
https://stackoverflow.com/questions/14238138/heightforwidth-label
Those layout and widgets are at these paths
The CamCOPS authors have relicensed those layouts and widgets as LGPL ucam-department-of-psychiatry/camcops#340
So this would be a complete solution to Qt layout problem, but it would require a few steps.
The text was updated successfully, but these errors were encountered: