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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.0.0
    • None
    • All

    Description

      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.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            zccrs JiDe Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes