本页内容

void QML Value Type

空值类型。更多...

详细说明

void 类型专用于为返回undefined 的JavaScript函数添加类型注释。例如:

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

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

您无法在 QML 中声明void 属性。

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