<QtDarwinHelpers>
专用于基于Darwin的操作系统的辅助宏。更多内容...
| 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)
预声明一个 Core Foundation 类型type 。这包括实际类型和引用类型。例如,Q_FORWARD_DECLARE_CF_TYPE(CFString) 声明了 __CFString 和 CFStringRef。
Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type)
预声明一个可变的 Core Foundation 类型type 。这包括实际类型和引用类型。例如,Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(CFMutableString) 会声明 __CFMutableString 和 CFMutableStringRef。
Q_FORWARD_DECLARE_OBJC_CLASS(classname)
以一种既可作为Objective-C又可作为C++进行编译的方式,对Objective-C的classname 进行前向声明。
这主要用于可能被 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.