Web links in Qt Assistant wont push to a web browser, instead tries to open in Assistant and fails
-
We are using Qt Assistant to display documentation for our cross platform app. We have multiple qch files, some are from Qt and some are our own. Our own are a generated by Doxygen and have content digested from code and also from referenced md files.
In one of the md files, I have a web link - assume it is http://google.com
- When I view the qch in Qt Creator and click the link, my default web browser launches and the correct page is launched.
- When I view the qch in Qt Assistant and click the link, Assistant attempts to open the page within itself and fails with the following message:
@ The page could not be found!
Error loading: http://google.com
Please make sure that you have all documentation sets installed.@Why doesn't Assistant behave the same as Creator? How can force the web link to launch in a browser?
I have tried two different syntax'es:
markdown: google.
html: <a href="http://google.com" target="_blank">google</a>Both give the same result (as described above)
-
Hi,
What version of Qt Assistant is it?
What is your OS?
Do you have a default web browser set up?
Have you tried this on other computers?
It works fine for me (Qt Assistant 5.4.0, Windows 8.1 x64). I can open any page from the official Qt documentation, scroll to the bottom, then click the link, "GNU Free Documentation License version 1.3". Qt Assistant then launches Google Chrome to display http://www.gnu.org/licenses/fdl.html
-
I am using Qt Assistant 5.4.0 on OSX 10.8.5, Windows 8.1 and Linux 14.04. all machines have a default browser.
Yes the “GNU Free Documentation License version 1.3” link does exit out to a browser - but that appears to be in a footer or similar. I'm describing links that are in the body of my help page. These do not behave the same as the link you describe. I cant crack open the qch's from Qt to see how that link is formed (but essentially that's what I need) -
[quote author="Marika" date="1420751037"]that appears to be in a footer or similar. I'm describing links that are in the body of my help page. These do not behave the same as the link you describe.[/quote]Footer links and body links should behave the same. Try going to the "QWebSocket":http://doc.qt.io/qt-5/qwebsocket.html page and clicking on "RFC 6455" -- that's an external link too.
[quote author="Marika" date="1420751037"]I cant crack open the qch's from Qt to see how that link is formed (but essentially that's what I need)[/quote]The official Qt documentation uses QDoc to generate .qch files. Links are specified using the "\l command":http://doc.qt.io/qt-5/08-qdoc-commands-creatinglinks.html
You can see the source code for the QWebSocket page at https://qt.gitorious.org/qt/qtwebsockets/source/src/websockets/qwebsocket.cpp
Since the Doxygen links behave differently from QDoc links, please report this to the Doxygen team.