I want to generate documentation with QDoc and I tried as the QDoc guide told. I can get documentation, but it's not complete.
I tried both on:
- qt 5.11.3, llvm 6.0.1, windows 10
- qt 5.12.3, llvm 6.0.1, ubuntu 16.04
but it's all the same.
Here is the code:
project.qconconf
headerdirs = .
sourcedirs = .
exampledirs = .
imagedirs = ./images
sources.fileextensions = "*.cpp *.qdoc *.mm *.qml"
headers.fileextensions = "*.h *.ch *.h++ *.hh *.hpp *.hxx"
examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
examples.imageextensions = "*.png *.jpeg *.jpg *.gif *.mng"
outputdir = html
outputformats = HTML
mainwindow.cpp
/*!
* \class MainWindow
* \brief mainwindow for ui .
*/
/*!
constructor
*/
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
/*!
destructor
*/
MainWindow::~MainWindow()
{
delete ui;
}
/*!
function test
*/
bool MainWindow::test() const
{
return test_;
}
/*!
function setTest
*/
void MainWindow::setTest(bool test)
{
test_ = test;
}
After I execute command "qdoc proect.qdocconf",warning as follows:
.../mainwindow.cpp:4: (qdoc) warning: Class MainWindow has no \inmodule command; using project name by default:
.../mainwindow.cpp:9: (qdoc) warning: Cannot tie this documentation to anything [I found a /*! ... */ comment, but there was no topic command (e.g., '\fn', '\page') in the comment and no function definition following the comment.]
I got two files: ".index" and "mainwindow.html"
"mainwindow.html":
MainWindow
Contents
Detailed Description
MainWindow Class
mainwindow for ui interface.
More...
Detailed Description
mainwindow for ui interface.
Seems like it can't get any other info except "\class".
Does anyone know what might cause the documentation to not be generated?