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

MessageDialog is triggering handler twice

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: Quick: Dialogs
    • Labels:
      None
    • Platform/s:
      Linux/X11, macOS, Windows

      Description

       

      import QtQuick 2.12
      import QtQuick.Dialogs 1.3
      import QtQuick.Controls 1.2
      MessageDialog {
       id: root
       icon: StandardIcon.Information
       title: qsTr("Delete content")
       text: qsTr("<p>You are about to delete file.</p>" +
       "<p>Tap 'OK' when you are ready to proceed.</p>")
       standardButtons: StandardButton.Cancel | StandardButton.Ok
      Component.onCompleted: {
      console.log("test onCompleted")
       open()
       }
      onAccepted: {console.log("test onAccepted")}
       onRejected: {console.log("test onRejected")}
      }
      
      qml: test onCompleted
      qml: test onAccepted
      qml: test onAccepted
      qml: test onCompleted
      qml: test onRejected
      qml: test onRejected
      

      Simple code, onAccepted and onRejected fires twice, on macOS.
      I have tried this code on iOs, no problem.
       

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            aneox Alexandr Bochkarev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes