Qt Quick 布局
Qt Quick 布局是一组 QML 类型,用于在用户界面中排列项目。与定位器不同, 布局还可以调整子项目的大小。这使它们非常适合可调整大小的用户界面。Qt Quick
请访问Qt Quick 布局概述页面开始学习。
使用模块
模块的 QML 类型可通过QtQuick.Layouts
导入。要使用这些类型,请在 .qml 文件中添加以下导入语句:
import QtQuick.Layouts
布局
与 GridLayout 相同,但只有一列 | |
提供在网格中动态排列项目的方法 | |
为推送到 GridLayout、RowLayout 或 ColumnLayout 上的项目提供附加属性 | |
为布局中的 QQuickItems 提供占位符 | |
与 GridLayout 相同,但只有一行 | |
堆叠项目,一次只能看到一个项目 |
文章和指南
示例
相关模块
相关模块
许可证
Qt Quick Layouts 可在The Qt Company 的商业许可下使用。此外,它还可以在自由软件许可证下使用。自 Qt 5.4 起,这些自由软件许可证为GNU Lesser General Public License 第 3 版或GNU General Public License 第 2 版。更多详情,请参阅Qt 许可。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.