QT:QTextBrowser设置最大行数

ui->textBrowser->document()->setMaximumBlockCount(10);