本文介绍了奇怪//! Quick Controls 2.0 QML源中的注释语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

在查看Quick Controls 2.0源时,我发现了一个奇怪的注释语法,我在docs中似乎找不到:

While looking through Quick Controls 2.0 sources, I came upon a peculiar comment syntax that I can't seem to find in docs:

//! [property]
property: ...
...
//! [property]

例如, //! [contentItem] //! [background] 可在 TabButton.qml 中看到。

我不知道这是否只是开发人员选择的用来分隔代码区域的约定,还是确实有一些特殊的含义?

I wonder if this is just a convention chosen by the developers to delimit regions of code, or does it indeed have some special meaning?

推荐答案

使用以开头的Qt注释来解析生成文档。这适用于单行和多行注释。

With Qt comments that begin with ! are parsed to generate documentation. That applies to single and multi line comments.

在这种特殊情况下,它似乎不包含任何实际文档,它用于表示行的个别实现

In this particular case however it doesn't seem to contain any actual documentation, it is used to signify the lines where individual implementation details begin and end.

您可以详细了解文档格式。

You can learn more about the documentation format here.

这篇关于奇怪//! Quick Controls 2.0 QML源中的注释语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 18:12