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

Setting a replacment QScrollBar in QAbstractItemView causes loss of connection between View and Scrollbar

    XMLWordPrintable

Details

    • All

    Description

      QAbstractItemVIew inherits from QAbstractScrollAreaPrivate and in

      QAbstractItemViewPrivate::init()

      connects actionTriggered, and valueChanged of both the horizontal and vertical scrollbars, with slots verticalScrollbarAction and horizontalScrollbarAction that for more complex views will call the QAbstractItemModel's fetchMore if necessary.

      However, if you call QAbstractScrollArea::setVerticalScrollBar with a replacement scrollbar, those connections are not made and get stale.

      It calls QAbstractScrollAreaPrivate::replaceScrollBar that connects valueChanged (and rangeChanged), to its own slots, but the connections of its subclass are not updated (and cannot be without adding a virtual method).

      The same happens with setHorizontalScrollbar.

      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
            scott.aron.bloom Scott Bloom
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes