How to set at the end of verticalScrollBar in QWebView
-
Hello all, the problem is : scrollbar can't set at the end of QWebView. Look at screenshot;
http://i.stack.imgur.com/A3fva.pngvoid 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?
-
so, the root of that problem - QWebElement. Fix it? - use setHtml or setContent. Thanks all. Question closed.