Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to set at the end of verticalScrollBar in QWebView
Qt 6.11 is out! See what's new in the release blog

How to set at the end of verticalScrollBar in QWebView

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 979 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Denis I.
    wrote on last edited by
    #1

    Hello all, the problem is : scrollbar can't set at the end of QWebView. Look at screenshot;
    http://i.stack.imgur.com/A3fva.png

    void MainWindow::WriteToWebView(QString szSrc) { QWebElement elDoc = ui->webView->page()->mainFrame()->documentElement();
    
           if(!elDoc.isNull())
           {
               QWebElement elBody = elDoc.findFirst("body");
    
               if(!elBody.isNull())
               {
                    elBody.appendInside(szSrc + "<br /> ");
               }
    
           }
           //didn't work
           ui->webView->page()->mainFrame()->setScrollBarValue(Qt::Vertical, ui->webView->page()->mainFrame()->scrollBarMaximum(Qt::Vertical));
    }
    

    How i can fix it?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Denis I.
      wrote on last edited by
      #2

      so, the root of that problem - QWebElement. Fix it? - use setHtml or setContent. Thanks all. Question closed.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved