PDA

View Full Version : [QtGui] Problem with a QTextBrowser



Auliyaa
18th February 2010, 07:59
Hi everyone,

I'm using a QTextBrowser displaying various raw text documents in my app. Since the widget is pretty small, the major part of the text is hidden and the user has to scroll down to see it entirely.
My question is: Is there a way to know what part of a text is currently displayed on the screen ? Since QTextBrowser inherits from QAbstractScrollArea I thought I could find something there but nothing seems to do the trick :x

high_flyer
18th February 2010, 09:02
Is there a way to know what part of a text is currently displayed on the screen ?
You can know by querying the scroll bar position in relation to its range.
There is a very good illustrated documentation at QScrollBar

Auliyaa
19th February 2010, 07:51
Exactly what I was looking for. Thank you so much :)