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

When the repeater is used as the contentItem of the menu, all items are invisible

    XMLWordPrintable

Details

    • Linux/X11
    • 19637c2241 (qt/qtdeclarative/dev) b99382c637 (qt/qtdeclarative/6.3) c54bf3d73c (qt/qtdeclarative/6.4) b99382c637 (qt/tqtc-qtdeclarative/6.3) c54bf3d73c (qt/tqtc-qtdeclarative/6.4)

    Description

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Layouts
      
      ApplicationWindow {
          width: 640
          height: 480
          visible: true
          title: "QTBUG-104470 | contentY=" + flickable.contentItem.y
      
          Menu {
              id: menu
              visible: true        
              contentItem: FocusScope {
                  implicitHeight: flickable.height            
                  Button {
                      anchors {
                          top: parent.top
                          topMargin: 5
                          horizontalCenter: parent.horizontalCenter
                      }
                      z: 1
                      text: "Button Up"
                  }            
      
                  Flickable {
                      id: flickable
                      width: parent.width
                      height: Math.min(contentHeight, 300)
                      contentHeight: repeaterLayout.implicitHeight
                      clip: true                
                      ScrollIndicator.vertical: ScrollIndicator {} 
                     
                      ColumnLayout {
                          id: repeaterLayout
                          width: parent.width                    
                          Repeater {
                              model: menu.contentModel
                          }
                      }
                  }            
                  Button {
                      anchors {
                          bottom: parent.bottom
                          bottomMargin: 5
                          horizontalCenter: parent.horizontalCenter
                      }
                      z: 1
                      text: "Button Down"
                  }
              }        
      
              Repeater {
                  model: 40
                  MenuItem {
                      objectName: "Item: " + modelData
                      text: objectName
                  }
              }
          }
      }
      

      If the above code is used, all items will not be visible after 6173fc0e4be93604286b9a424f1aa3ff5896082a.

      Attachments

        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
              chen_bin Chen Bin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes