这个工具在qt设计器中叫什么?

港周六

在此处输入图片说明

这个工具叫什么,怎么用qt设计器制作?其他软件常用来通过按下来调整宽度和高度。

音乐家

它是一个拆分器,或者用 Qt 的术语来说,是一个QSplitter

您不能直接将它添加到 UI,因为对于 Designer 来说,它充当布局管理器(即使技术上不是,因为它继承自 QFrame,所以它是一个小部件)。

You can create a splitter by selecting two or more widgets that are considered siblings (they are children of the same parent, or all selected widgets are children of items that have the same parent), right click on any of them, and select "Layout horizontally/vertically in Splitter" from the "Lay out" menu.

Note that:

  • since QSplitter is a container (similarly to a layout dragged from the Widget Box), you also need to create a parent layout (if none exists) and add the splitter to that parent layout;
  • QSplitter 只能添加基于 QWidget 的类,因此 Designer 在向拆分器添加布局时会创建“不可见”的小部件,而这些小部件不能被 Designer 直接访问,因此如果您需要将多个小部件添加到拆分器的单个“页面”,通常最好将它们分组到由容器管理的布局中(一个基本的 QWidget 就足够了)并将容器添加到拆分器;

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章