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

REG: On reset color of palette is not inherit color form parent palette

XMLWordPrintable

    • All

      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls
      
      ApplicationWindow {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          palette.button: "red"
      
          Button {
              id: button
              anchors.centerIn: parent
              property bool paletteEdited: false
      
              text: paletteEdited ? "Reset Button Color" : "Change Button Color"
              onClicked: {
                  if (paletteEdited) {
                      //reset
                      button.palette.button = undefined
                  } else {
                      button.palette.button = "yellow"
                  }
                  paletteEdited = !paletteEdited
              }
          }
      }
      
      

      1. On default, the Button background color is "red"
      2. After clicking the Button that it background color is "yellow"
      3. After again clicking the Button to reset palette, But it background color is not “red”

      I think the Button background should restore to “red” on after the third step.

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

            edcooke Ed Cooke (Inactive)
            zccrs JiDe Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes