[PyQt] Preview does not resize layouts

Hans-Peter Jansen hpj at urpla.net
Mon Jan 16 20:28:01 GMT 2017

On Montag, 16. Januar 2017 05:54:22 Rich Shepard wrote:
> On Sun, 15 Jan 2017, michael h wrote:
> > You are probably missing a layout somewhere. Many of the example .ui files
> > you sent to the group had this issue. One of the videos I sent show adding
> > these (004 around 17s).
> Michael,
>    That could have been the reason. This past weekend I went through all
> tabs examining each layout in the widget list. Found (and removed) the
> phantom layout on Contacts that was a very small block in the upper left
> corner of the tab widget; its removal cleared the spacer warning when I
> save the file.
>    Also, I redid the contacts and companies tabs to simplify them. I'd still
> need to learn how to configure the stretch factor to reduce the size of
> some widgets (e.g., the State widget needs be large enough for only two
> characters). I believe that this first effort of mine with PyQt5 is now
> much better (copy attached). I am also looking to learn how to make the
> tabs and contailed elements shrink and expand when I change the size of the
> display window.

Rich, not sure, what creates you such problems for assigning layouts to 
widgets, but you still have "No parking" signs on some, resulting in the 
effects, you're describing.

All I did is went though your tabs, added a horiz. spacer to the Add/Mod/Del 
buttons, clicked into the tab background, and added a vertical layout.
Then I removed a few silly spacers, and that's it: a fully resizable window.

The intend of the OK/Cancel buttons escapes me at the moment.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mainframe.ui
Type: application/x-designer
Size: 31106 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170116/a94dce0e/attachment-0001.bin>

More information about the PyQt mailing list