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

Text overlap in custom menu

    XMLWordPrintable

Details

    • Linux/X11
    • 6173fc0e4b (qt/qtdeclarative/dev) 6173fc0e4b (qt/tqtc-qtdeclarative/dev) 8c155f015a (qt/qtdeclarative/6.3) 31531f0bd4 (qt/qtdeclarative/6.4) 8c155f015a (qt/tqtc-qtdeclarative/6.3) 31531f0bd4 (qt/tqtc-qtdeclarative/6.4)

    Description

      When the contentItem of the custom menu is the Item, the text overlaps, such as the sample code and sample picture in the attachment

      import QtQuick
      import QtQuick.Controls
      
      Window {
          width: 640
          height: 480
          visible: true
          title: "QTBUG-104470"
      
          Menu {
              id: menu
              visible: true
      
              contentItem: FocusScope {
                  implicitHeight: view.implicitHeight
                  Button {
                      anchors {
                          top: parent.top
                          topMargin: 5
                          horizontalCenter: parent.horizontalCenter
                      }
                      z: 1
                      text: "Button Up"
                      visible: view.interactive
                  }
                  ListView {
                      id: view
                      width: parent.width
                      implicitHeight: Math.min(contentHeight, 300)
                      model: menu.contentModel
      
                      clip: true
                      currentIndex: menu.currentIndex
                      ScrollIndicator.vertical: ScrollIndicator {}
                  }
                  Button {
                      anchors {
                          bottom: parent.bottom
                          bottomMargin: 5
                          horizontalCenter: parent.horizontalCenter
                      }
                      z: 1
                      text: "Button Down"
                      visible: view.interactive
                  }
              }
      
              Repeater {
                  model: 100
                  MenuItem { text: "Item: " + modelData }
              }
          }
      }
      

      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