Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.0.0
-
None
-
Windows 7 Pro x64 with Qt 5.0.0 x86, precompiled package downloaded from qt-project.org
Description
I have a very simple app with QTextEdit with AcceptRichText=false and font family and size set to specific values. Now, if I type any text, then delete it either by performing select all and pasting some text (can be even copied from the same QTextEdit), or simply deleting selected text and typing something new, font family and size get reset to what I think are default values for QTextEdit.
Natural behaviour would be to preserve font family and size.
EDIT: Found out this has to do with me using QTextEdit::setFontFamily() and QTextEdit::setFontPointSize(), which seem to set font only at the cursor position, instead of QTextEdit::setFont(). Using the latter fixes the problem.
Still, described QTextEdit behaviour is inconsistent - text edit set not to accept rich text shouldn't ever display rich text, e.g. two font families at a time.