本页内容

Layouting::Form Class

class Layouting::Form

将标签-字段对排列在双栏表单布局中(QFormLayout )。更多...

Header: #include <Form>
Inherits: Layouting::Layout

详细说明

每次调用addRow() 都会定义一行。如果一行包含单个项目,则该项目将横跨两列(全宽)。如果包含两个项目,则第一个项目作为标签,第二个项目作为字段。 普通的QString 会自动被包装在QLabel 中。包含超过两个项目的行会将多余的项目打包到字段列中的辅助QHBoxLayout 中。在可能的情况下,QLabel 组合会自动设置。

默认情况下,字段扩展策略为AllNonFixedFieldsGrow 。

另请参阅 Layouting::Grid 和Layouting::Layout 。

Copyright © The Qt Company Ltd. and other contributors. 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.