In questa pagina

void QML Value Type

Il tipo di valore vuoto. Altro...

Descrizione dettagliata

Il tipo ` void ` viene utilizzato esclusivamente per l'annotazione di tipo delle funzioni JavaScript che restituiscono ` undefined`. Ad esempio:

function doThings() : void { console.log("hello") }

Questo serve ad aiutare gli strumenti di sviluppo ad analizzare le chiamate a tali funzioni e a compilarle, insieme alle funzioni che le chiamano, in C++.

Non è possibile dichiarare proprietà di tipo ` void ` in QML.

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.