void QML Value Type

空值类型。更多

详细说明

void 类型专门用于对返回undefined 的 JavaScript 函数进行类型标注。例如

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

这是为了帮助工具分析对此类函数的调用,并将它们及其调用者编译为 C++。

您不能在 QML 中声明void 属性。

另请参阅 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.