16,212
社区成员
发帖
与我相关
我的任务
分享
QTextCursor textCursor = ui->textEdit->textCursor();
QTextBlockFormat textBlockFormat;
textBlockFormat.setLineHeight(40, QTextBlockFormat::FixedHeight);//设置固定行高
textCursor.setBlockFormat(textBlockFormat);
ui->textEdit->setTextCursor(textCursor);