加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – QT样式评论(智能感知?)

发布时间:2020-12-16 06:56:19 所属栏目:百科 来源:网络整理
导读:我在QTCreator的2.1中注意到,他们现在有一种类似于Visual Studio的智能感知.我知道intellisense是微软这个有用工具提示概念的名称,它弹出来给你一个方法,参数等的描述,所以我不知道这实际上叫什么.有谁知道如何将这些类型的弹出注释添加到QT中的方法和类?
我在QTCreator的2.1中注意到,他们现在有一种类似于Visual Studio的智能感知.我知道intellisense是微软这个有用工具提示概念的名称,它弹出来给你一个方法,参数等的描述,所以我不知道这实际上叫什么.有谁知道如何将这些类型的弹出注释添加到QT中的方法和类?

再次说明我所说的是javadoc注释或C#中的“///”.我希望QT的开发者能够让用户自己发表评论.

谢谢您的帮助,

JEC

解决方法

我一直想要这样做.

我在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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读