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

MessageDialog is triggering handler twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 5.14.2
    • Quick: Dialogs
    • None
    • 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

        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
              aneox Alexandr Bochkarev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes