bred
30th September 2010, 15:05
Given an HTML code like this:
<H1>Table of Contents</H1>
<P><A href="#section1">Introduction</A><BR>
<A href="#section2">Some background</A><BR>
<A href="#section2.1">On a more personal note</A><BR>
...the rest of the table of contents...
...the document body...
<H2><A name="section1">Introduction</A></H2>
...section 1...
<H2><A name="section2">Some background</A></H2>
...section 2...
We have a QTextBrowser object:
QTextBrowser textb ;
......
textb.setHtml( html_with_anchor ) ;
textb.setOpenLinks ( false ) ;
It's possible give an external order to the QTextBrowser object to scroll to an anchor, without any mouse click.
I want a function like this:
textb. GoToAnchor( section2 )
Tnx.
<H1>Table of Contents</H1>
<P><A href="#section1">Introduction</A><BR>
<A href="#section2">Some background</A><BR>
<A href="#section2.1">On a more personal note</A><BR>
...the rest of the table of contents...
...the document body...
<H2><A name="section1">Introduction</A></H2>
...section 1...
<H2><A name="section2">Some background</A></H2>
...section 2...
We have a QTextBrowser object:
QTextBrowser textb ;
......
textb.setHtml( html_with_anchor ) ;
textb.setOpenLinks ( false ) ;
It's possible give an external order to the QTextBrowser object to scroll to an anchor, without any mouse click.
I want a function like this:
textb. GoToAnchor( section2 )
Tnx.