On 13/03/2017 17:31, Bill Somerville wrote:
#1 Cut widgets #2 Add GroupBox #3 Paste widgets into GroupBox
Hi Mike,reading this again I think you may have missed how Qt widgets and layouts interact. You can just put widgets inside another but that requires that layout is manual and you don't want that in almost all cases.
Each widget can contain others but that is normally done by setting the containing widget's layout then adding the contained widgets to the layout. The layout hands the ownership of the contained widgets to the containing widget but takes responsibility for the layout and for passing the resulting size hint up to the containing widget.
Layouts can also be added to other layouts so that vertical, horizontal, grid and form layouts can be mixed together within an outer layout.
The name of the game is to have every widget inside a layout which in turn is in another layout or the layout for a containing widget. This repeats right back to the top of the tree which is the top level window widget. Once you have that then the complete layout is flexible and platform or window manager agnostic.
In Designer you set the layout of a widget, e.g. a QWidget that is being used to contain other widgets, by right-clicking it and selecting the desired layout type. You then drop other widgets into that layout or add contained layouts and drop widgets into them. You do not want widgets simply contained in a parent widget, you almost always want widgets having their layout managed by a layout manager.
73 Bill G4WJS.
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ wsjt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wsjt-devel
