我创建了一个qml库,现在我想创建一个文档。我将QDoc与QT5.10.10与msvc2015和LLVM 9.0.0结合使用。
我想显示以下2项数据:

下面是我目前的代码:
// MyButton.qml - the header
/*!
QtQuick.Controls 1.1
\qmltype SolidButton
\qmlmodule MyModule
\inherits QtQuick::Button
\brief My button. It inherits from Button from QtQuick.
\section1 Detailed Example
\qml
MyButton {
text: "My Button";
}
\endqml
*/
// qdocconf
sourcedirs += ../qml/
headerdirs += ../qml/
imagedirs = .
sources.fileextensions = "*.qml"
outputdir = ./doc/qml/
outputformats = HTML
HTML.stylesheets = style.css
HTML.headerstyles = "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\"/>\n"--编辑:正如评论中所问的,这里我有错误

如果我什么都不做,我就明白了:

--编辑2:我还应该提到我使用的是Visual,而不是
发布于 2021-08-11 07:45:01
在qml文件中不允许使用qmlmodule。您必须将它添加到单独的myQMLmoduleName.qdoc文件中:
/*!
\qmlmodule MyControls
\brief Mycustom controls.
*/然后将*.qdoc扩展添加到qdoc的myConfig.qdocconf中,以查找myQMLmoduleName.qdoc。
# what kind of sources should be processed
sources.fileextensions += "*.qdoc *.cpp *.qml"
sourcedirs += ../path/to/your/config/https://stackoverflow.com/questions/68320087
复制相似问题