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

Control 2.0 ScrollView (QQuickScrollView) doesn't remove ScrollBars from its children tree when I override them with new ScrollBars

XMLWordPrintable

    • All

      If I want to use a ScrollView element and want to override the ScrollBar.vertical and ScrollBar.horizontal properties (and I have to if I want to set any of the Accessible.* properties on them) I do this:

      ScrollView {

         id: myScrollView

         ScrollBar.vertical: ScrollBar

      {         // add my code    }

       

         ScrollBar.horizontal: ScrollBar

      {        // add my code    }

      Doing so, the code in QQuickScrollBarAttached that adds the new scroll bars to the ScrollView, calls setParentItem() on each new ScrollBar that I just defined, but never calls ::removeChild() on the parent object to remove the old ScrollBars. See code in QQuickScrollBar.cpp, Line: 1002, inside QQuickScrollBarAttached::setHorizontal / setVertical.

      This ends up with a ScrollView that now has 4 children, 2 being the default ScrollBars and 2 being the ScrollBars I just defined.

      This looks bad in Accessibility where even if I want to hide all these scrollbars, I end up with 2 or more scrollbar nodes being announced in Narrator/Voiceover

       

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

            frederik Frederik Gladhorn
            cosminp Cosmin Pancratov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes