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

QScrollArea: ensureVisible and ensureWidgetVisible use a big default value for xmargin and ymargin, which makes the result of focusRect very wrong

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.6.2, 4.6.3, 4.7.1
    • None
    • fa175f7c09e6e664f347ac9804b1a7db1d997ef2

    Description

      In QScrollArea::ensureWidgetVisible, it adds a big margin to the focusRect, so the focus rect is incorrectly out of the visible rect, which causes that scrollarea unnecessarily scrolls to right-bottom of the inner widget.
      Please modify the default value of xmargin and ymargin to a small value ( maybe 0 is more appropriate).

      The attached example can be used to reproduce the following problem:

      • press "Start" button in "4 Table", the whole inner widget jumps to a minus left-top position.

      Attachments

        1. scrollarea1.png
          scrollarea1.png
          23 kB
        2. scrollarea2.png
          scrollarea2.png
          19 kB
        3. scrollarea-jump.tar.gz
          8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes