How to open documentation in qch format in Debian based systems?
I wanted to download C++ documentation and found cppreference-doc-en-qch
in Debian's archive:
Description: C and C++ standard library reference (English, Qt Help variant) A version of online C and C++ standard library reference manual available at en.cppreference.com, suitable for viewing offline. . This package contains a Qt Help book.
dpkg -L cppreference-doc-en-qch
reveals only
/usr/share/cppreference/doc/qch/cppreference-doc-en-cpp.qch
, and xdg-open
doesn't know how to open it.
How do I actually read this piece of documentation I just installed, or, in general, qch files?
2 answers
-
Install Qt Assistant (either 5 or 6 works):
apt install qt5-assistant
This might be already installed, the package in the question does depend on it but for some reason
qt5-doc
does not, it only recommends it. -
Option 1: Load it with the CLI
-
Register the help file in the Qt Assistant:
assistant -register /usr/share/cppreference/doc/qch/cppreference-doc-en-cpp.qch
It should output "Documentation successfully registered."
-
Open the Qt Assistant:
assistant
-
-
Option 2: Load it with the GUI
-
Open the Qt Assistant:
assistant
-
In the window that opens, go to
Edit > Preferences > Documentation > Add
. -
In the file chooser dialogue box that opens, choose the qch file you want to view, i.e.
/usr/share/cppreference/doc/qch/cppreference-doc-en-cpp.qch
.
-
-
The program may take some time to update the search index; This will be indicated by a loading bar in the bottom right corner.
-
The documentation is now available through the program, you can select in the contents pane as depicted below or just search the index.
Tested with Qt Assistant 5.15.13.
0 comment threads
A web search turned up the Qt online documentation, which suggests using Qt Assistant to organize and read help files packaged as *.qch files.
That looks to be packaged by Debian as assistant-qt6. Alternatively, cppreference-doc-en-qch depends on qttools5-dev-tools which in turn pulls in qt5-assistant which provides /usr/lib/qt5/bin/assistant.
As an alternative in this specific case, Debian also packages what looks to be that same documentation in HTML format as cppreference-doc-en-html.
0 comment threads