SVG file in qhelpgenerator / assistant
-
Hi and welcome to devnet,
Try adding the svg module to your project.
-
Thanks for the answer. I'm not really familiar with the qhelpgenerator / assistant, so with the "Try adding the svg module to your project." is a bit vague to me.
The question where do I add what?
is it possible to get an image showing what to do?
is it a setting in for the qhelpgenerator or the assistant? -
See here for the Qt SVG module.
-
The SVG support comes with it, so just try it to check whether it allows the SVG to be loaded.
-
@SGaist said in SVG file in qhelpgenerator / assistant:
check whether it allows the SVG to be loaded.
the question is how can I check this?
The small project I used:
The
index.qhp
file:<?xml version="1.0" encoding="UTF-8"?> <QtHelpProject version="1.0"> <namespace>org.doxygen.Project</namespace> <virtualFolder>doc</virtualFolder> <filterSection> <filterAttribute>doxygen</filterAttribute> <toc> <section title="My Project" ref="index.html"> <section title="Main" ref="index.html"> </section> </section> </toc> <keywords> </keywords> <files> <file>aa.svg</file> <file>index.html</file> </files> </filterSection> </QtHelpProject>
the
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=11"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>My Project: Main</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> </head> <body> Generated <img src="aa.svg" alt="default"/> </body> </html>
The
aa.svg
:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=11"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>My Project: Main</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> </head> <body> Generated <img src="aa.svg" alt="default"/> </body> </html>
The used commands:
D:\Qt\qt-everywhere-src-5.14.0\install_nmake_2017_64\bin\qhelpgenerator.exe index.qhp -o "My Project.qch" D:\Qt\qt-everywhere-src-5.14.0\install_nmake_2017_64\bin\assistant.exe
The result is in the assistant:
so we can see that the image is not displayed, the image should look like:
-
Just to be sure, if you use a .png, does it work ?
-
Yes with a png file it does work.
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=11"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>My Project: Main</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> </head> <body> Generated <img src="aa.svg" alt="default"/> <br> Generated <img src="aa.png" alt="default"/> </body> </html>
index.qhp
<?xml version="1.0" encoding="UTF-8"?> <QtHelpProject version="1.0"> <namespace>org.doxygen.Project</namespace> <virtualFolder>doc</virtualFolder> <filterSection> <filterAttribute>doxygen</filterAttribute> <toc> <section title="My Project" ref="index.html"> <section title="Main" ref="index.html"> </section> </section> </toc> <keywords> </keywords> <files> <file>aa.png</file> <file>aa.svg</file> <file>index.html</file> </files> </filterSection> </QtHelpProject>
The png file:
The result:
-
Can you show the qdoc configuration file you are using ?
-
I don't have a qdoc configuration file or maybe there is one in the Qt tree that I'm not aware of.
Note that I'm not creating the qhp file through a Qt program but it is created by means of another program (doxygen)
(Slow reply, can only post every 600 seconds, as I have not enough reputation yet) -
By the way, which version of Qt are you using ?
-
The used version qt-everywhere-src-5.14.0
As a reference the used configure line:
..\qt-everywhere-src-5.14.0_2017_64\configure.bat -opensource -release -confirm-license --shared=no --static=yes -prefix D:\Qt\qt-everywhere-src-5.14.0\install_nmake_2017_64 -nomake tests -nomake examples -sanitize thread
-
What if you use on of the pre-built version ?
-
Is there a quick possibility to get the qhelpgenerator and the assistant (for 5.15.2 or another version)?
I found hhttps://www.qt.io/download-open-source but it looks like to take ages...
(I'll try to keep downloading ...)Edit: The fact that it took "ages" was because I used everything of the 5.15.2 version, not just the e.g. msvc2019_64 part.This give quite a reduction in used disk space (and in installation time, though for just 2 needed executables it still is quite long).
-
I installed the 5.15.2 version and found the
D:\Qt\5.15.2\5.15.2\mingw81_32\bin\qhelpgenerator.exe D:\Qt\5.15.2\5.15.2\mingw81_64\bin\qhelpgenerator.exe D:\Qt\5.15.2\5.15.2\msvc2015_64\bin\qhelpgenerator.exe D:\Qt\5.15.2\5.15.2\msvc2019\bin\qhelpgenerator.exe D:\Qt\5.15.2\5.15.2\msvc2019_64\bin\qhelpgenerator.exe
and
D:\Qt\5.15.2\5.15.2\mingw81_32\bin\assistant.exe D:\Qt\5.15.2\5.15.2\mingw81_64\bin\assistant.exe D:\Qt\5.15.2\5.15.2\msvc2015_64\bin\assistant.exe D:\Qt\5.15.2\5.15.2\msvc2019\bin\assistant.exe D:\Qt\5.15.2\5.15.2\msvc2019_64\bin\assistant.exe
I used the msvc2019_64 version and this does work (I also tried msvc2015_64a and this works as well) .
It is still very interesting to know why my own build didn't work, so I can build my own version when necessary.
-
I am experiencing the same issue. The SVG file is created by doxygen + qhelpgenerator, and then imported into QtCreator via Options, Help, Add qch file.
When pressing F1 on a function, it opens the help, but the dependency graphs (svg) are not properly shown in QtCreator 5.0 with Ubuntu19. Should I maybe open a bug report?
-
Sorry I lost track of this one.
Yes you can. Even better if you can provide a minimal set of files and instructions to trigger this on the bug report.
-
Thanks, I created https://bugreports.qt.io/browse/QTCREATORBUG-26272
There is an attachment in case you want to reproduce yourself.