本页内容

Qt Quick Layouts - 基本示例

演示如何使用布局类型来排列用户界面。

包含文本框和按钮的行布局,以及包含带标签的输入框和跨行文本的网格布局

本示例演示了如何使用GridLayout 、RowLayout 和ColumnLayout 将UI组件轻松排列到布局中。

运行示例

您可以通过以下方式运行该示例:

示例项目 @ code.qt.io

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