AnyAiNi 发表于 2016-10-10 18:02:39

QTextEdit设置行高 行间距

QTextCursor textCursor = ui->textEdit->textCursor();
    QTextBlockFormat textBlockFormat;
    textBlockFormat.setLineHeight(40, QTextBlockFormat::FixedHeight);//设置固定行高
    textCursor.setBlockFormat(textBlockFormat);
    ui->textEdit->setTextCursor(textCursor);

页: [1]
查看完整版本: QTextEdit设置行高 行间距