Results 1 to 2 of 2

Thread: QTextBrowser, how to scroll ?

  1. #1
    Join Date
    Jan 2006
    Posts
    185
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTextBrowser, how to scroll ?

    I have a QTextBrowser and when I have a lot of data in it, then I can see the scroll bar, but I cannot scroll.

    How do I set the QTextBrowser to scroll ?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTextBrowser, how to scroll ?

    How can you not scroll? Is the scroll bar scrollable but the contents don't follow or what?

    I'm pretty sure the problem is not with QTextBrowser. Qt Assistant uses QTextBrowser. Launch it and see yourself that the scrolling works there.

    Or you can check with a minimal example:
    Qt Code:
    1. #include <QtGui>
    2.  
    3. int main(int argc, char *argv[])
    4. {
    5. QApplication a(argc, argv);
    6. QTextBrowser browser;
    7. for (int i = 0; i < 100; ++i)
    8. browser.append(QString("Line %1").arg(i));
    9. browser.show();
    10. return a.exec();
    11. }
    To copy to clipboard, switch view to plain text mode 
    So if the scrolling works with this, the problem must be elsewhere, right?

    PS. Are you possibly overriding any event handlers or using event filters?
    J-P Nurmi

Similar Threads

  1. QScrollArea's Scroll Bars
    By ToddAtWSU in forum Qt Programming
    Replies: 5
    Last Post: 19th September 2006, 13:27
  2. Retrieving offsets of scroll in QWorkspace
    By hardgeus in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 02:25
  3. [QT4] QtextBrowser and image size (win)
    By sebgui in forum Qt Programming
    Replies: 0
    Last Post: 28th March 2006, 21:01
  4. how to adjust sizes of QTextBrowser?
    By Pan Wojtas in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2006, 22:25
  5. QRubberBand painting in the scroll area widget
    By SkripT in forum Qt Programming
    Replies: 7
    Last Post: 17th January 2006, 16:48

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.