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

Deafult ScrollBar does not disappear when overridden in ScrollView.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.15.2
    • Quick: Controls 2
    • None
    • All, Android, Linux/X11, Linux/Other display system, Windows

    Description

      I recently upgraded Qt version of a project from 5.12.8 to 5.15.2. I have a custom ScrollBar in ScrollView, it works fine. But there are also another noninteractive tiny ScrollBars on corners.

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
      
          ScrollView {
              anchors.centerIn: parent
      
              width: 200
              height: 200
              contentWidth: 400
              contentHeight: 400
              clip: true
      
              ScrollBar.horizontal: ScrollBar {
                  visible: false
              }
      
              ScrollBar.vertical: ScrollBar {
                  visible: false
              }
      
              Rectangle {
                  width: 400
                  height: 400
                  gradient: Gradient {
                      GradientStop { position: 0.0; color: "lightsteelblue" }
                      GradientStop { position: 1.0; color: "blue" }
                  }
              }
          }
      }

      It was not an issue back in Qt5.12.8. I tested it on Android, Ubuntu, Windows and custom Buildroot Linux. Seems like it applies to all platforms.

      Attachments

        1. image-2022-01-05-15-51-11-866.png
          15 kB
          Igor Bugaev
        2. image-2022-01-05-15-51-51-585.png
          5 kB
          Igor Bugaev
        3. main.qml
          0.7 kB
          Igor Bugaev

        Issue Links

          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
              kaothecoder Kaan Uçar
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes