XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • None
    • 5.15.1
    • Quick: Controls 2
    • None
    • $cat /etc/issue
      Arch Linux \r (\l)

      $qmake -version
      QMake version 3.1
      Using Qt version 5.15.1 in /usr/lib
    • Linux/X11

    Description

      I found two bugs with the Quick.Controls 2's Menu item in Qt 5.15.1. As far as I know it has been working in 5.13.

      1. opening the menu at first sets a correct value for it's x property, but opening it again changes it, and the right side of the menu is no longer visible
      2. clicking on the ToolButton to trigger the Menu's open() function multiple times causes a "vibrating" menu, which can't be used anymore

      I attached a video for better understanding, and an example project also.

       

      Here is the relevant source code:

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Window 2.15
      import QtQuick.Controls.Material 2.15
      import QtQuick.Layouts 1.12
      
      ApplicationWindow {
          width: 640
          height: 480
          visible: true
      
          header: ToolBar {
              Material.theme: Material.Dark
      
              RowLayout {
                  anchors.fill: parent
      
                  Item {
                      Layout.fillWidth: true
                  }
      
                  ToolButton {
                      text: "B"
      
                      onClicked: menu.open();
      
                      Menu {
                          id: menu
                          y: parent.height
                          width: longest.implicitWidth
                          onWidthChanged: console.log("width", width)
                          onXChanged: console.log("x", x)
                          onOpenedChanged: console.log("opened", opened)
      
                          MenuItem { text: "small" }
                          MenuItem { text: "longer menu" }
                          MenuItem { text: "lil longer menu" }
                          MenuItem {
                              id: longest
                              text: "this is the longest menu item here"
                          }
                      }
                  }
              }
          }
      }
       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            tomicooler Tamás Dömők
            Votes:
            11 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes