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

Custom DialogButtonBox buttons go outside Dialog with macOS style

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 6.4
    • Quick: Controls 2
    • None
    • macOS

    Description

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow {
          width: 640
          height: 480
          visible: true
          title: "quick"
      
          Dialog {
              id: root
              objectName: "opacityDialog"
              title: qsTr("Opacity")
              modal: true
              dim: false
              focus: true
              visible: true
              width: 400
              // Works
      //        standardButtons: Dialog.Ok | Dialog.Cancel
      
              // Buttons go past right side of dialog
              footer: DialogButtonBox {
      
                  Button {
                      objectName: "opacityDialogOkButton"
                      text: qsTr("OK")
      
                      DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
                  }
                  Button {
                      objectName: "opacityDialogCancelButton"
                      text: qsTr("Cancel")
      
                      DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
                  }
              }
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: