[Interest] Displaying Help from QHelpEngine through QWebEngine
Mike Jackson
imikejackson at gmail.com
Wed Feb 10 02:05:21 CET 2016
I went looking through the QAssistant sources but could not really
follow what was going on. The best that I could tell is maybe there is a
custom Network handler that qthelp:// uses. Kind of like a super
lightweight "server" that QWebKit talks to when requesting URLs that are
stored in the .qhc file?
We were going to eventually move to Qt 5.6 when it is officially
released. Just seems odd that Qt has you package up your files into a
SQLite data base but then offers no convenient way of actually
displaying that content to the user. Odd. For now what I think we are
going to do is to ship both the loose html files and the .qhc file. We
can use the .qhc for full text searching but use the loose .html files
for display. Seems to work, just did not really want to ship 2x sets of
the docs.
Thanks for the heads up about Qt 5.6
Mike Jackson
> Allan Sandfeld Jensen <mailto:kde at carewolf.com>
> February 9, 2016 at 7:00 PMvia Postbox
> <https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach>
>
> What you need is the QWebEngineUrlSchemeHandler which was added in Qt
> 5.6. It
> adds the ability to add custom URL schemes to QtWebEngine.
>
> Best regards
> `Allan Jensen
> Mike Jackson <mailto:imikejackson at gmail.com>
> February 9, 2016 at 5:28 PMvia Postbox
> <https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach>
> I am attempting to use the QHelp* classes to allow our users to search
> our help files (html based) using the same mechanisms as those used
> with QAssistant. So far I have hacked together the major pieces and
> hooked everything up. I am able to manually generate a .qhc file from
> all of our html and image sources. I got so far as to enter a search
> string and have the relevant documents appear in the results widget.
> Now when I click on a link I would like to actually display the help.
> Currently we use QWebEngineView on Qt 5.5.1 because QWebKit was being
> deprecated. I am pretty sure the issue as to why nothing is displayed
> is because I get a URL like the following:
>
>
> "qthelp://bluequartzsoftware.net.dream3d.1.0/DREAM3D/addorientationnoise.html"
>
>
> and QWebEngine probably has no idea what to do with that URL scheme. I
> have looked around the internet using Google and while other people
> are asking this same question there are no actual answers. About the
> only possibility seems to get the file contents from the HelpEngine
> along with any CSS and Image assets, write all of those to a temp
> location on the filesystem, then load the URL from the temp location?
> There must be an easier way that I am just missing.
>
>
> Any help is greatly appreciated.
>
>
--
Michael A. Jackson 400 S. Pioneer Blvd
Owner, President Springboro, Ohio 45066
BlueQuartz Software, LLC EMail: mike.jackson at bluequartz.net
Voice: 937-806-1165 Web: http://www.bluequartz.net
Fax:
937-746-0783<https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160209/5f887b18/attachment.html>
More information about the Interest
mailing list