What's the difference between QTextEdit
and QPlainTextEdit
, why use one over the other?
I'm coding a text editor as an exercice to learn Qt5, and now I'm wondering whether to use QTextEdit
or QPlainTextEdit
.
So far I've only found out that you can display images in QTextEdit
, but other than that they look somewhat identical to me.
My text editor should support some basic syntax highlighting (probably using textChanged()
signal), but that's pretty much as far as the requirements go.
Google searches for "QTextEdit vs QPlainTextEdit" and "QTextEdit compared to QPlainTextEdit" didn't give me any decent results that would compare the two classes.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…