简体   繁体   English

删除Qt小部件布局的边距

[英]Remove Qt widget layout's margins

I want to remove the spacing marked as red lines in the screenshot. 我想删除屏幕快照中标记为红线的间距。 I set layout's contents margins to (0,0,0,0), re-sized parent widget to minimum but still can not get rid of those spaces. 我将布局的内容边距设置为(0,0,0,0),将父窗口小部件的大小调整为最小,但仍无法摆脱这些空间。 This only happens on Mac. 这仅在Mac上发生。 Looking for some help. 寻求帮助。 Thanks in advance! 提前致谢! 屏幕截图

Q按钮

As nnb told, welcome to the weird size policies on mac. 正如nnb所说,欢迎使用Mac上怪异的大小政策。 But you can wrap layout to widget and crop margins. 但是您可以将布局包装到小部件和裁切边距。

在此处输入图片说明

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM