I'm using a QTextEdit for user input. For some reason I can't clear it properly, I always end up with a blank paragraph (the cursor is on the 2nd line).. I've tried every way I can think off, and nothing seems to work:

Qt Code:
  1. inputEdit->clear();
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. inputEdit->setHtml( "" );
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. inputEdit->setPlainText( "" );
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. QTextCursor cursor( inputEdit->document() );
  2. cursor.select( QTextCursor::Document );
  3. cursor.removeSelectedText();
  4. cursor.clearSelection();
  5. cursor.movePosition( QTextCursor::Start );
  6. inputEdit->setTextCursor( cursor );
To copy to clipboard, switch view to plain text mode 

None of these seem to actually clear the text edit completely, using editInput->toHtml() always shows a HTML document with a blank paragraph in it.. what am I doing wrong here?

Thanks.