1

I see very extensive Qt C++ class documentation, e.g. at https://doc.qt.io/qt-5/classes.html. But does the documentation include class inheritance diagrams so that we may quickly see how these are all related?

Tomasso
  • 693
  • 2
  • 9
  • 17
  • 6
    Usually it's not necessary. There are no deep inheritance. And documentation organized very good - so you will see all members (including inherited) in one list. – Dmitry Sazonov May 15 '19 at 22:00

1 Answers1

0

As @DmitrySazonov mentioned, usually it's not necessary to see whole Qt C++ class diagram.

But if you have this special needs, here is quite good and working scenario. Since Qt has well documented source code and this code is qDoc-powered (which is compatible with doxygen). You may generate required diagrams by yourself. (I'm not sure how much time will it take you, but probably get some popcorn beforehand)

I'll show you example how to prepare diagrams for QtConcurrent module only (doxygen work took me ~8s on i7-6820HQ).

  1. Install doxygen. Typically:
sudo apt install doxygen
  1. Get and unpack Qt sources (http://download.qt.io/official_releases/qt/5.12/5.12.3/single/).
  2. Use console and navigate to qt-everywhere-src-5.12.3/qtbase/src/.
  3. Generate standard Doxygen file by command:
doxygen -g
  1. Edit qt-everywhere-src-5.12.3/qtbase/src/Doxygen. Append next lines (or make sure that everywhere in Doxyfile any assignments of these variables are commented):
EXTRACT_ALL          = YES
CLASS_DIAGRAMS       = YES
HIDE_UNDOC_RELATIONS = NO
HAVE_DOT             = YES
CLASS_GRAPH          = YES
COLLABORATION_GRAPH  = YES
UML_LOOK             = YES
UML_LIMIT_NUM_FIELDS = 50
TEMPLATE_RELATIONS   = YES
DOT_GRAPH_MAX_NODES  = 100
MAX_DOT_GRAPH_DEPTH  = 0
DOT_TRANSPARENT      = YES

According to this answer.

Find INPUT section and put:

INPUT                  = concurrent

Find GENERATE_LATEX section and change to :

GENERATE_LATEX         = NO

NOTE: If you are familiar with doxygen, edit Doxyfile as you wish -- there are plenty of possible settings like logo, additional texts, file patterns, excludes etc.

  1. To generate doxygen documentation just run doxygen.

As a result you'll get folder qt-everywhere-src-5.12.3/qtbase/src/html with generated documentation. Open index.html.


To see results refer to this page.

NG_
  • 6,895
  • 7
  • 45
  • 67