LayoutItem QML Element

The LayoutItem element allows declarative UI elements to be placed inside Qt's Graphics View layouts. 更多...

Since: Qt 4.7

特性

详细描述

LayoutItem is a variant of Item with additional size hint properties. These properties provide the size hints necessary for items to work in conjunction with Qt 图形视图 layout classes such as QGraphicsLinearLayout and QGraphicsGridLayout . The Qt layout mechanisms will resize the LayoutItem as appropriate, taking its size hints into account, and you can propagate this to the other elements in your UI via anchors and bindings.

This is a QGraphicsLayoutItem subclass, and its properties merely expose the QGraphicsLayoutItem functionality to QML.

The LayoutItem example demonstrates how a LayoutItem can be used within a 图形视图 scene.

特性文档编制

maximumSize : QSizeF

The maximumSize property can be set to specify the maximum desired size of this LayoutItem


minimumSize : QSizeF

The minimumSize property can be set to specify the minimum desired size of this LayoutItem


preferredSize : QSizeF

The preferredSize property can be set to specify the preferred size of this LayoutItem