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

Regression (Qt >= 5.12): Buttons in QML Dialog require two mouse clicks to trigger when opened via Platform MenuItem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.2, 5.14.0 Alpha
    • 5.12.0, 5.12.1, 5.13.0 Alpha 1
    • GUI: Menus, Quick: Dialogs
    • None
    • OS: Windows 10 1803
      QtQuick 2.12+
      QtDialog 1.3
      Qt.labs.platform 1.1
    • Windows
    • 38504041148f2d1cffea6520ea448dd4171adb0b (qt/qtbase/5.12)

    Description

      Summary describes it already. If you open a QML Dialog with a MenuItem derived from qt.labs.platform, the buttons in the opened Dialog require two mouse clicks to trigger with all Qt versions earlier than 5.12.x (latest working version is Qt 5.11.3).

      Tested on Windows 10 only.

      Relevant qml file:

      import QtQuick 2.13
      import QtQuick.Window 2.13
      import Qt.labs.platform 1.1 as Platform
      import QtQuick.Dialogs 1.3
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Dialog Focus Bug")
      
          Platform.MenuBar {
              id: menuBar
      
              Platform.Menu {
                  id: fileToolButton
                  title: "File"
      
                  Platform.MenuItem {
                      id: importMenuItem
                      text: "Settings"
      
                      onTriggered: dlg.open()
                  }
              }
          }
      
          Dialog {
              id: dlg
              title: "Settings"
              standardButtons: StandardButton.Ok | StandardButton.Cancel
          }
      }
      

      Attachments

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

        Activity

          People

            anrocha André De La Rocha (Inactive)
            danra Daniel Rauch
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes