Incorrect display of Qt 4.8 documentation

Starting with Qt Creator version 4.2.1 and higher, the documentation for Qt 4.8 looks like this:


Everything is fine with the documentation for Qt 5.8:


On an older version of Qt Creator, everything is fine with both documentations.

Has anyone encountered this problem? Maybe you can download the corrected documentation files somewhere? Or somehow collect *.qch files via qhelpgenerator?

Author: yrHeTateJlb, 2017-09-30

1 answers

The root of this problem is in QTextEdit. Namely, in bug, which appeared in Qt version 5.7. The essence of the bug is that QTextEdit incorrectly handles the line-height property.

There are two solutions:

Simple: Wait for the release of Qt 5.10.
They fixed this bug there. Accordingly, in the version of Qt Creator, built with Qt 5.10, there will be no problems.


Complex: Rebuild the documentation manually.

Under Linux, I the following steps helped:

  1. Opening the file /usr/share/qt4/doc/html/style/offline.css.
  2. Replace all lines line-height: <число>; with line-height: <число>em.
  3. Go to /usr/share/qt4/doc/html/.
  4. Executing sudo qhelpgenerator qt.qhp -o ../qt.qch.
  5. Restarting Qt Creator.

The file now appears in the /usr/share/qt4/doc/ folderqt.qch, which Qt Creator will pick up automatically. For order, you can move it to the folder qch

Theoretically, the same thing can be done under windows, but for some reason in Qt 4.8 for windows there is no file qt.qhp and I do not know where to get it.

Result : Success!

 1
Author: yrHeTateJlb, 2017-10-02 08:36:14