QT_USE_PROTOBUF_LIST_ALIASES
在生成的代码中启用QList 类型别名
该属性于 Qt 6.9 版本中引入。
注意:此 属性处于技术预览阶段,未来版本中可能会发生变更。
控制QT_USE_PROTOBUF_LIST_ALIASES 的定义。该定义可在生成的代码中为protobuf消息的QList 启用类型别名。
将此属性设置为TRUE 可为protobuf目标启用该定义;设置为FALSE 可将其禁用。默认值为TRUE 。
qt6_add_protobuf(protobuf_target
...
)
set_target_properties(protobuf_target PROPERTIES
QT_USE_PROTOBUF_LIST_ALIASES FALSE
)注意: 如果.proto 模式中包含带有Repeated 后缀的消息,则为 protobuf 消息的QList 生成 类型别名会导致名称冲突。为避免此类冲突,请将该属性设置为FALSE 。
© 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.