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

DialogButtonBox custom button's text not visible

XMLWordPrintable

    • Linux/X11, Windows

      When Diaog contains DialogButtonBox with multiple custom buttons and has no width specified or size is binded to parent size, button's text is not visible.

      This is regression in 5.12.3, in 5.11.2 and 5.12.2 it works as expected.

      When width is specified manualy or there is single button/standard buttons it works as expected.

      Example code:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Controls 2.5
      
      Window {
          id: window
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Dialog {
              id: dialog
      
      //        width: 320            //Works
              width: parent.width / 2 //Do not works
      
              modal: true
      
              closePolicy: Popup.NoAutoClose
      
              footer: DialogButtonBox {
                  Button {
                      text: qsTr("Close")
                      DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
                  }
                  Button {
                      text: qsTr("Open")
                      DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
                  }
              }
          }
      
          MouseArea {
              anchors.fill: parent
      
              onClicked: dialog.open()
          }
      }
      

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            kowalikm Mateusz Kowalik
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes