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

Add Dialog and DialogButtonBox

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 5.8.0 Alpha
    • None
    • Quick: Controls 2
    • None
    • bfb0a9ebe3b1dc6b0f06ec2d66469ba878fbe98b & 7a835a4b4e350710ac8fc45c7f3cbb25ea7a5fe0

    Description

      It would be nice to have a Dialog and DialogButtonBox types, that support standard and custom dialog buttons, and emit accepted() / rejected() signals as appropriate.

      Dialog {
          title: "Standard buttons"
          standardButtons: Dialog.Ok | Dialog.Cancel
          onAccepted: { }
          onRejected: { }
      }
      
      Dialog {
          title: "Custom buttons"
          footer: DialogButtonBox {
              Button { text: "Custom 1"; DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole }
              Button { text: "Custom 2"; DialogButtonBox.buttonRole: DialogButtonBox.RejectRole }
          }
          onAccepted: { }
          onRejected: { }
      }
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-51090
          # Subject Branch Project Status CR V

          Activity

            People

              Unassigned Unassigned
              jpnurmi J-P Nurmi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes