Obtaining tool tips from Qt Help File
-
I would like all of my help documentation to be contained with my Qt help file(s). I have someone else writing the content. How can I extract the tool tips from it?
I would store all of the tool tips in tooltips.html. For each tip, I could have a tagged anchor or div section with a unique id or something to identify it. The code would use this id to find the tool tip in the html file and set it on the widget.
I'm just not sure how to get the data from the help file.
Any suggestions?
Thanks!
-
Did you see the QtHelp module docs?
-
Yes I see the QtHelp docs. I see I can get the file data for the toolstips.html file but I'm not how to parse the data to get the html for the particular id I want. I guess I could put each tool tip in its own html file but that seems a little much.
-
It's up to you to structure the html file in away that you can extract the snippet you need. The easiest way would certainly a singel file for every tool tip.
-
The more I think about it, it's probably best to do one file per tool tip.
Thanks for the replies.
-
Another option would be small text files that you put into a resource file (.qrc). Either make one resource file for each language or make a subdirectory for each language.