[Qt-interest] Anchors in HTML File...

Eric Clark eclark at ara.com
Sun May 23 17:57:53 CEST 2010


Hello Everyone!

I have a program that uses a QWebView to display html documents. The problem is when I display an html document that is a local file on my machine. Basically, I have a URL like file:///C:/someFile.html<file:///C:\someFile.html>. Everything works great when I open this file, but the file itself has some HTML anchors in it along with links to those anchors. When I click on one of the links, it produces a URL like file:///C:/someFile.html#myAnchor<file:///C:\someFile.html#myAnchor>. Every time I try to go to an anchor in the QWebView, the web view shows an empty page. I have checked the source of the page to ensure that the anchor actually exists and I have opened the same html page in Firefox and the anchors do exist and Firefox does the right thing by taking me to that anchor in the file. But, the QWebView does not. Does anyone know if I am missing something or if this type of anchor is not supported in the QWebView for local files (btw, it works fine if the file is an external html file over the internet using http).

Thanks in Advance!
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100523/18642c6e/attachment.html 


More information about the Qt-interest-old mailing list