<QtDarwinHelpers> 代理页面

宏文档

Q_FORWARD_DECLARE_CF_TYPE(type)

Forward-声明一个核心基础type 。这包括实际类型和 ref 类型。例如,Q_FORWARD_DECLARE_CF_TYPE(CFString) 声明了 __CFString 和 CFStringRef。

Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type)

Forward-declares 一个可变的核心基础type 。这包括实际类型和 ref 类型。例如,Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(CFMutableString) 声明了 __CFMutableString 和 CFMutableStringRef。

Q_FORWARD_DECLARE_OBJC_CLASS(classname)

前向声明 Objective-Cclassname 的方式,使其可以编译为 Objective-C 或 C++。

这主要是为了在头文件中使用,这些头文件可能同时包含在 Objective-C 和 C++ 源文件中。

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