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

Scrollview having strange behaviours when used as part of a custom component

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.2.0
    • Quick: Controls 2
    • None
    • Windows

    Description

      Hello everyone,

      I am migrating some software from Qt5 to Qt6. I am currently busy trying to solve some problems with a custom ScrollView (which was working fine before the migration): 

      ScrollView {
          id: scrollView
          
          default property alias contents: contentColumn.data // Data splits up items        into resources and visual children
      
          ScrollBar.horizontal: ScrollBar {
              policy: ScrollBar.AlwaysOff
          }
          ScrollBar.vertical: ScrollBar {
              policy: ScrollBar.AsNeeded
          }
      
          Column {
              width: scrollView.width
              spacing: scrollView.spacing
      
          Column {
              id: contentColumn
              width: scrollView.width
              spacing: scrollView.spacing
              move: Transition {
                  NumberAnimation { easing.type: Easing.OutQuint; properties: "y"; duration: 384 }
              }
          }
          }
      }
      

       

      The idea behind is to automatically distribute the components in the scrollview as a column, with the given transition. However, this is what I get as a result:

      The scrollbar appears in the top left corner, and even though it works (it scrolls up and down as it should) I don't understand why it looks like this. Any suggestions?

       

      Thank you.

       

      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
            mariag María García
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes