In questa pagina

point QML Value Type

un valore con gli attributi x e y. Altro...

Import Statement: import QtQml

Descrizione dettagliata

Il tipo point si riferisce a un valore con gli attributi x e y.

Per creare un valore di tipo point, specificarlo come stringa "x,y":

CustomObject { myPointProperty: "0,20" }

Oppure utilizzare la funzione Qt.point():

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

Quando si integra con C++, tenere presente che qualsiasi valore di tipo QPoint o QPointF passato a QML da C++ viene automaticamente convertito in un valore di tipo point. Quando un valore di tipo point viene passato a C++, viene automaticamente convertito in un valore di tipo QPointF.

Le proprietà di tipo point sono di tipo Qt.point(0, 0) per impostazione predefinita.

Vedi anche Tipi di valore QML.

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