point QML Value Type

ein Wert mit den Attributen x und y. Mehr...

Detaillierte Beschreibung

Der Typ point bezieht sich auf einen Wert mit den Attributen x und y.

Um einen point -Wert zu erstellen, geben Sie ihn als "x,y"-String an:

CustomObject { myPointProperty: "0,20" }

Oder verwenden Sie die Funktion Qt.point():

CustomObject { myPointProperty: Qt.point(0, 20) }

Bei der Integration mit C++ ist zu beachten, dass jeder QPoint oder QPointF Wert, der von C++ an QML übergeben wird, automatisch in einen point Wert umgewandelt wird. Wenn ein point Wert an C++ übergeben wird, wird er automatisch in einen QPointF Wert umgewandelt.

Eigenschaften vom Typ point sind standardmäßig Qt.point(0, 0).

Siehe auch QML-Wertetypen.

© 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.