a value with x and y attributes.
The
point
type refers to a value with
x
and
y
屬性。
要創建
point
value, specify it as a "x,y" string:
CustomObject { myPointProperty: "0,20" }
或使用 Qt.point() 函數:
CustomObject { myPointProperty: Qt.point(0, 20) }
集成 C++ 時,注意任何
QPoint
or
QPointF
值
傳入 QML 來自 C++
is automatically converted into a
point
value. When a
point
value is passed to C++, it is automatically converted into a
QPointF
值。
另請參閱 QML 基本類型 .