Is there any way to get size of the contents of QTextBrowser in Qt4?
It seems that documentLayout()->documentSize() should do this, but this function returns a negative size after I had set the html to the corresponding QTextDocument:
Qt Code:
textDoc->clear(); textDoc->setHtml( m_html ); qWarning( "testDoc height = %d \n", int( textDoc->documentLayout()->documentSize().height() ) ); // prints -1To copy to clipboard, switch view to plain text mode
Bookmarks