Results 1 to 3 of 3

Thread: [QtGui] Problem with a QTextBrowser

  1. #1
    Join Date
    Feb 2010
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows

    Default [QtGui] Problem with a QTextBrowser

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: [QtGui] Problem with a QTextBrowser

    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
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Feb 2010
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: [QtGui] Problem with a QTextBrowser

    Exactly what I was looking for. Thank you so much

Similar Threads

  1. QtGui/QApplication: No such file or directory
    By codeslicer in forum Qt Programming
    Replies: 4
    Last Post: 9th December 2011, 15:29
  2. Qt 4.3.3 - Server build without QtGui?
    By Mike in forum Installation and Deployment
    Replies: 7
    Last Post: 12th February 2008, 19:49
  3. QTextBrowser problem
    By Mrdata in forum Qt Programming
    Replies: 5
    Last Post: 24th May 2007, 22:05
  4. QTextBrowser Problem
    By Cutey in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2007, 10:19
  5. using QtGui
    By nupul in forum Qt Programming
    Replies: 5
    Last Post: 7th April 2006, 12:36

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.