ColumnLayout QML Type
Idéntico a GridLayout, pero con una sola columna. Más...
| Import Statement: | import QtQuick.Layouts |
| Inherits: |
Propiedades
- layoutDirection : enumeration
(since QtQuick.Layouts 1.1) - spacing : real
- uniformCellSizes : bool
(since QtQuick.Layouts 6.6)
Descripción detallada
Para poder utilizar este tipo de forma más eficiente, se recomienda comprender el mecanismo general del módulo Qt Quick Layouts. Consulte Qt Quick Layouts Overview para obtener más información.
Está disponible como una comodidad para los desarrolladores, ya que ofrece una API más limpia.
Los elementos de un ColumnLayout admiten estas propiedades adjuntas:
- Layout.minimumWidth
- Layout.minimumHeight
- Layout.preferredWidth
- Layout.preferredHeight
- Layout.maximumWidth
- Layout.maximumHeight
- Layout.fillWidth
- Layout.fillHeight
- Layout.alignment
- Layout.margins
- Layout.leftMargin
- Layout.rightMargin
- Layout.topMargin
- Layout.bottomMargin
- Layout.horizontalStretchFactor
- Layout.verticalStretchFactor

ColumnLayout{ spacing: 2 Rectangle { Layout.alignment: Qt.AlignCenter color: "red" Layout.preferredWidth: 40 Layout.preferredHeight: 40 } Rectangle { Layout.alignment: Qt.AlignRight color: "green" Layout.preferredWidth: 40 Layout.preferredHeight: 70 } Rectangle { Layout.alignment: Qt.AlignBottom Layout.fillHeight: true color: "blue" Layout.preferredWidth: 70 Layout.preferredHeight: 40 } }
Lee más sobre las propiedades adjuntas aquí.
Consulte también RowLayout, GridLayout, StackLayout, Column, y Qt Quick Descripción general de los diseños.
Documentación de propiedades
layoutDirection : enumeration [since QtQuick.Layouts 1.1]
Esta propiedad contiene la dirección del diseño de la columna - controla la alineación horizontal de los elementos dentro de la columna. Si se especifica Qt.RightToLeft, los elementos alineados a la izquierda se alinearán a la derecha y los alineados a la derecha se alinearán a la izquierda.
Valores posibles:
| Constante | Descripción |
|---|---|
Qt.LeftToRight | (por defecto) Los elementos se alinean de izquierda a derecha. |
Qt.RightToLeft | Los elementos se disponen de derecha a izquierda |
Esta propiedad se introdujo en QtQuick.Layouts 1.1.
Ver también GridLayout::layoutDirection y RowLayout::layoutDirection.
spacing : real
Esta propiedad contiene el espaciado entre cada celda. El valor por defecto es 5.
uniformCellSizes : bool [since QtQuick.Layouts 6.6]
Si esta propiedad se establece en true, el diseño forzará a todas las celdas a tener un tamaño uniforme.
Esta propiedad se introdujo en QtQuick.Layouts 6.6.
Véase también GridLayout::uniformCellWidths, GridLayout::uniformCellHeights, y RowLayout::uniformCellSizes.
© 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.