<QtDarwinHelpers>
基于达尔文的操作系统特有的辅助宏。更多
| Header: | #include <QtDarwinHelpers> |
宏
| Q_FORWARD_DECLARE_CF_TYPE(type) | |
| Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type) | |
| Q_FORWARD_DECLARE_OBJC_CLASS(classname) |
宏文档
Q_FORWARD_DECLARE_CF_TYPE(type)
Forward-声明一个核心基础type 。这包括实际类型和 ref 类型。例如,Q_FORWARD_DECLARE_CF_TYPE(CFString) 声明了 __CFString 和 CFStringRef。
Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type)
前向声明一个可变的核心基础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++ 源文件都可能包含这些头文件。
© 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.