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

QTextEdit: QTextFrameFormat's setTopMargin() does not work as expected

    XMLWordPrintable

Details

    Description

      • when there is no vertical scrollbar and one only increase the height of the QTextEdit, it apparently doesn't change the top margin at all
      • when there is no vertical scrollbar and one only decrease the height of the QTextEdit, it only changes the top margin when the text is right at the bottom (and a vertical scrollbar is about to be created)
      • when there is a scrollbar and one only increase the height, it only changes the top margin when the size of the vertical scrollbar is almost (or is) equal to the size of the scrollbar area (meaning the scrollbar is about to be removed)
      • when there is a scrollbar and one only decrease the height, it doesn't change the top margin at all

      Please note that the behavior above occurs when one only resize the height of the QTextEdit. When one resize the width at any point, it automatically sets the top margin to the correct value.

      Run the attached example and using corner resize grip resize width+height every thing works but if you simply resize height it does not work.

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            engvolds Morten Engvoldsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes