[PyQt] Designer: top level spacer warning on save

Hans-Peter Jansen hpj at urpla.net
Sat Jan 14 12:03:25 GMT 2017


On Freitag, 13. Januar 2017 09:03:47 Rich Shepard wrote:
>    After editing a tab page sometimes, when I save the file, designer pops
> up a message box telling me, "This file contains top level spacers. They
> will _not_ be saved. Perhaps you forgot to create a layout."
> 
>    According to the object inspector the layout sequence is: Main Window,
> Central Widget, Main Tab. Then each tab's widgets are nested in a vertical
> layout which might contain vertical spacers.
> 
>    Where do I look for the top level spacer that designer does not like?

Once, you add layouts to all container widgets, this becomes obvious. Your 
contacts tab contain two superfluous layouts: horizonalLayout_4 and 
verticalLayout. As long as widgets are displayed with an "No parking" flag in 
the inspector, a layout is missing.

Pete


More information about the PyQt mailing list