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

Button does not obey its button palette field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.3.1
    • Quick: Controls 2
    • None
    • Win10/QTCreator 8.0/MinGW11
    • Windows

      When configuring a palette for a button (standard one, no styling beside the palette), the buttonText controls text color, but all other palette fields mentioned in button.qml are not functional.

      Here is a nonsensical example to display the problem:

          Button {
              id: control // named like this just for later test below.
              text: qsTr("I am ready!")
              palette {
                  button: "red"
                  buttonText: "red"
                  dark: "red"
                  mid: "red"
                  highlight: "red"
              }
          }
      

      Here is the visual result on Windows (file is attached as test.qml, can be opened with qml.exe):

      Looking at Button.qml, I don't see what is causing the bug. palette.buttonText works, palette.button does not. They are structurally at the same depth, seemingly referencing the same control thing.
      Strangely, if we copy-paste the background part of Button.QML (hopefully, I got the right file; there as so many with this name. I chose the one in "Basic" folder) in the button itself below palette, it works as we would expect. (file is attached as test2.qml can be opened with qml.exe)

        1. image-2022-08-01-22-51-07-858.png
          1 kB
          Jerome Banal
        2. test.qml
          0.4 kB
          Jerome Banal
        3. test2.qml
          0.9 kB
          Jerome Banal
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            eden2004 Jerome Banal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes