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

error customizing QML ScrollBar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.1
    • None
    • Windows

    Description

      Hi -

      I've tried customizing ScrollBar as follows:

      import QtQuick
      import QtQuick.Controls
      import colors.stylesheet
      
      ScrollBar {
          policy: ScrollBar.AsNeeded
          minimumSize: 0.1
          contentItem: Rectangle {
              implicitWidth: 6
              radius: width / 2
          }
          background: Rectangle {
              implicitWidth: 6
              color: Colors.background
          }
      }
      

      And I'm having two problems:

      1. the bar doesn't fully extend to the top (or bottom) of the scroll area. It appears to stop where the standard scrollbar arrows go (but aren't present in my customization).
      1. at runtime, I get the following error:
        qrc:/qt-project.org/imports/QtQuick/Controls/Windows/ScrollBar.qml:33:49: Unable to assign [undefined] to int

      Might be cockpit error, but I don't see what I'm doing wrong here.

      Attachments

        1. activity.PNG
          activity.PNG
          40 kB
        2. scroll.PNG
          scroll.PNG
          5 kB
        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
            mzimmers Michael Zimmers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes