point QML Value Type
带有 x 和 y 属性的值。更多
详细说明
point
类型指的是带有x
和y
属性的值。
要创建point
值,请将其指定为 "x,y "字符串:
CustomObject { myPointProperty: "0,20" }
或使用Qt.point() 函数:
CustomObject { myPointProperty: Qt.point(0, 20) }
与 C++ 集成时,请注意从 C++ 传入 QML 的任何QPoint 或QPointF 值都会自动转换为point
值。当point
值传入 C++ 时,它会自动转换成QPointF 值。
point
类型的属性默认为Qt.point(0, 0)
。
另请参阅 QML 值类型。
© 2025 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.