本页内容

C

rect QML Value Type

一个具有 x、y、width 和 height 属性的值。更多...

Since: Qt Quick Ultralite 2.9

详细描述

rect 类型指具有x 、y 、width 和height 属性的值。

要创建一个rect 值,请使用Qt.rect()函数:

Item {
    property rect myRectProperty: Qt.rect(50, 50, 100, 100)
}

rect 类型还提供了只读属性left 、right 、top 和bottom 。这些属性与C++ counterparts 中的属性相同。

在某些 Qt 许可证下可用。
了解更多信息。