Qt Quick Layouts QML Types

Qt Quick Layouts模块提供 QML 类型,用于在用户界面中排列 QML 项目。这些 QML 类型与 Qt QuickQt Quick Controls.

可在 .qml 文件中使用以下导入语句将 QML 类型导入到您的应用程序中。

import QtQuick.Layouts

ColumnLayout

与 GridLayout 相同,但只有一列

GridLayout

提供在网格中动态排列项目的方法

Layout

为推送到 GridLayout、RowLayout 或 ColumnLayout 的项目提供附加属性

LayoutItemProxy

为布局中的 QQuickItems 提供占位符

RowLayout

与 GridLayout 相同,但只有一行

StackLayout

堆叠项目,一次只能看到一个项目

© 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.