Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5
-
None
Description
On a text (QGraphicsTextItem), with normal formatting such as font size, alignment and so on, but not table or bullets, pressing 2 Return keys should actually insert 2 lines.
But QWidgetTextControlPrivate::insertParagraphSeparator will remove any formatting, resulting in removal of alignment and invalid font properties.
The comment there says
// After a blank line, reset block and char formats. I.e. you can end a list,
// block quote, etc. by hitting enter twice, and get back to normal paragraph style.
But if you don't have "a list, block quote, etc." this should not happen -
The expectations for 2 new lines in normal text (rich text) - without lists - is to insert 2 new lines.
Also, QTextBlockFormat() and QTextCharFormat() are not "normal paragraph style". If reverting to the "normal paragraph style" was intended, then the properties from prior to the "list, block quote, etc." should be placed on the new block.