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

DialogButtonBox not regenerating layout on change of child Button width

XMLWordPrintable

    • Linux/X11
    • 2ae87dcece (qt/qtdeclarative/dev) 2ae87dcece (qt/tqtc-qtdeclarative/dev) 15b03052bc (qt/qtdeclarative/6.3) 15b03052bc (qt/tqtc-qtdeclarative/6.3) c6ad9c30c8 (qt/tqtc-qtquickcontrols2/5.15) 6da4296fac (qt/tqtc-qtdeclarative/6.2)

      Displaying the following QtQuick 2 dialog with Material styling on Qt 5.15.2, the DialogButtonBox footer doesn't appear to regenerate it's child button layout on change of child button width, and the widened Button ends up spilling over the RH edge of the Dialog. The same code run on Qt 5.9.8 works as one would expect.

      import QtQuick 2.7
      import QtQuick.Controls 2.2
      import QtQuick.Layouts 1.3
      import QtQuick.Window 2.2
      import QtQuick.Controls.Material 2.2
      
      Dialog {
          id: root
      
          title: "DialogButtonBox not regenerating child button layout on change of child width"
      
          height: parent.height*2/5
      
          width:  parent.width*2/3
      
          modal: true
      
          standardButtons: Dialog.Cancel;
      
          footer: DialogButtonBox {
      
              delegate: Button{}
      
              Button {
                  text: "Button A"
              }
      
              Button {
                  id: buttonB
                  text: "Button B"
      
                  Timer {
                      interval: 5000
                      repeat: false
                      running: true
                      onTriggered: {
                          buttonB.implicitWidth = 150
                      }
                  }
              }
          }
      }
      

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

            mitch_curtis Mitch Curtis
            richardlang Richard Lang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: