简体   繁体   English

使用属性 window 在 QT 网格布局中设置小部件的行和列

[英]Set the row and column of widget in QT grid layout using property window

I have added two labels and two textboxes in QT grid layout.我在 QT 网格布局中添加了两个标签和两个文本框。 These are all in vertical layout.这些都是垂直布局。 I want to make it in 2x2 grid.我想在 2x2 网格中制作它。 I want to set the row and column of widget using its property window or style sheet (not using code).我想使用其属性 window 或样式表(不使用代码)设置小部件的行和列。

I can see row and column in xml view of ui window but not in property window of my form.我可以在 ui window 的 xml 视图中看到行和列,但在我的表单的属性 window 中看不到。 Where can I find the row and column property of a particular widget inside a gridlayout.在哪里可以找到网格布局中特定小部件的行和列属性。

Thanks in advance提前致谢

If this is your intent如果这是你的意图

You can't control a widget's row/col in a grid layout using the properties tab.您无法使用属性选项卡在网格布局中控制小部件的行/列。 The only way is to drop the widget into a specific position in the layout (see the blue vertical line)唯一的方法是将小部件放入布局中的特定 position 中(见蓝色垂直线)

Drop your widgets there.把你的小部件放在那里。

Or, outside of the Designer, you may edit the .ui file and set the "row"/"column" values of the grid.或者,在 Designer 之外,您可以编辑.ui文件并设置网格的“行”/“列”值。

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

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