Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128642

[REG 5.15->6.5] QGraphicsTextItem Enter Enter abnormal behavior for normal text

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5
    • GUI: Text handling
    • None
    • Windows

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            Thalia Mihaela Gaspar
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes