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

QScrollArea::sizeHint() implementation broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.13
    • None
    • All

    Description

      In 5.2, the `viewportSizeHint()` method was added to make it easier to get the size hint of the scroll viewport. In `QAbstractScrollArea::sizeHint()` this is used to set the size hint for the widget when `AdjustToContents` is set as the size adjust policy.

       

      However, QScrollArea overrides this method with one that has nothing at all to do with the viewport. From what I can tell, it seems like `QScrollArea::sizeHint()` should just be deleted so the default implementation can be used, since it seems more correct.

       

      Further, `AdjustToContents` does not work because the internal widget is not watched for size changes, so the geometry is not updated when it should be.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            wrowclif Wayne Rowcliffe
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes