void QML Value Type

The empty value type. 更多...

詳細描述

The void type is exclusively used to type-annotate JavaScript functions returning undefined 。例如:

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

This is to help tooling analyze calls to such functions and compile them and their callers to C++.

You cannot declare void properties in QML.

另請參閱 QML Value Types .