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

QQuickBasicProgressBar::setColor() does nothing after initialization?

XMLWordPrintable

    • b1d53c599 (dev), 004985635 (6.6), 3c685b0c7 (6.5)

      Code

      import QtQuick
      import QtQuick.Controls.Basic
      
      Window {
          width: 640
          height: 480
          visible: true
      
          ProgressBar {
              id: prog
              anchors.centerIn: parent
              value: 0.5
          }
      
          Component.onCompleted: {
              prog.background.color = "cyan"
              prog.contentItem.color = "yellow"
          }
      
          Button {
              text: "Update"
              onClicked: {
                  prog.background.color = "magenta"
                  prog.contentItem.color = "black"
              }
          }
      }
      

      Outcomes

      • At startup, the right half of the bar is cyan and the left half is yellow (expected)
      • When the button is clicked, the right half of the bar turns magenta (expected)
      • When the button is clicked, the left half of the bar stays yellow instead of turning black (NOT expected)

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

            mitch_curtis Mitch Curtis
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes