I have a QPlainTextEdit widget that I insert HTML into via moving the cursor along.
What I have noticed is that if there are things that are in < > tags but are NOT valid html elements, then QPlainTextEdit seems to fail.
QString txt
= "You have the following commands: <br />read <#/next>, note <title>, remove #, list <from #/last>, marker <#/reset>";
QString txt = "You have the following commands: <br />read <#/next>, note <title>, remove #, list <from #/last>, marker <#/reset>";
To copy to clipboard, switch view to plain text mode
When do the following
ui->txtOutput->textCursor().insertHtml(txt);
ui->txtOutput->setTextCursor(prevCursor);
ui->txtOutput->moveCursor(QTextCursor::End);
ui->txtOutput->textCursor().insertHtml(txt);
ui->txtOutput->setTextCursor(prevCursor);
To copy to clipboard, switch view to plain text mode
I get the following showing up in the QPlainTextEdit widget
You have the following commands:
read , note
Is is possible to some how.. have QPlainTextEdit ignore non-valid HTML elements? Then again, I'm not 100% sure this is my issue, but it seems iike it so far.
(on a side note, is there a [pre] for things that are not code?)
Bookmarks