December 8, 2011

rturrentine rturrentine
Lab Rat
7 posts

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!

5 replies

December 8, 2011

peppe peppe
Ant Farmer
1005 posts

Did you see the QtHelp module docs?

 Signature 

Software Engineer
KDAB (UK) Ltd., a KDAB Group company

December 8, 2011

rturrentine rturrentine
Lab Rat
7 posts

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.

December 8, 2011

Volker Volker
Ant Farmer
5331 posts

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.

December 8, 2011

rturrentine rturrentine
Lab Rat
7 posts

The more I think about it, it’s probably best to do one file per tool tip.

Thanks for the replies.

December 8, 2011

Volker Volker
Ant Farmer
5331 posts

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.

 
  ‹‹ <SOLVED> Text editor found text is not visible.      [Solved] How to subclass QTableView when using the UI editor of QtCreator ››

You must log in to post a reply. Not a member yet? Register here!