gpt4 book ai didi

c++ - QT 样式注释(智能感知?)

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:19:52 25 4
gpt4 key购买 nike

我注意到在 QTCreator 的 2.1 中,他们现在有一种类似于 Visual Studio 的智能感知。我知道 intellisense 是 Microsoft 对弹出的有用工具提示概念的名称,它会为您提供方法、参数等的描述,所以我不知道这实际上 叫什么。有谁知道如何将这些类型的弹出式注释添加到 QT 中的方法和类中?

再次澄清我在说什么,就像 javadoc 注释或 C# 中的“///”。我希望 QT 的开发者可以让用户发表自己的评论。

感谢您的帮助,

杰斯

最佳答案

我也一直想做这个。

我在 qtCentre.org 上发现了这个帖子,其中有人将他们自己的文档集成到 QT Creator 工具提示中。我自己没有测试过,但听起来很合理:

http://www.qtcentre.org/archive/index.php/t-40324.html?s=98d48c38547da14b0725e5106d83c315

To use your own documentation in Qt Assistant (and in Qt Creator help as well) you need to create Qt Compressed Help file (.qch (http://doc.qt.nokia.com/4.7/assistant-custom-help-viewer.html#displaying-custom-documentation)) and register it in Assistant and Creator. Doxygen has several tools exactly for Qt. There are tags in it's config file, that help you to create the documentation exactly the way you need. E.g. with GENERATE_QHP tag you can make it create the ready qhp (http://doc.qt.nokia.com/4.7/assistant-custom-help-viewer.html#creating-a-custom-help-collection-file) (Qt Help Project) file (you need this to generate the .qch). If you don't need to edit this file manually before creating the .qhc, you can set the value of QHG_LOCATION tag to the location of your qhelpgenerator.exe (usually it's here (in Windows): /mingw/bin/qhelpgenerator.exe) and it will generate the ready documentation. Register it in Qt Assistant (optional) and Creator and you're done. After this all your documented types, functions, members, etc. will have the tooltip with F1 button hint. And of course pushing F1 will show your documented help for it.

关于c++ - QT 样式注释(智能感知?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5918005/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com