How to insert line into textedit ? So far I use this code

Qt Code:
  1. QTextCursor cursor(ui->textEdit->textCursor());
  2. cursor.insertHtml("<hr>");
To copy to clipboard, switch view to plain text mode 

But, hr can't be styled with <hr style="height:2px;color:red;">. I look qt have a class with name QTextLine. But I don't know and haven't a sample how to use that class for insert line into textedit