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

Document how to switch palettes

    XMLWordPrintable

Details

    Description

      There was a recent discussion where it became clear our documentation for changing palettes could be improved. The example that was brought up there was the following:

      Window {
          contentItem.palette: switchPalette ? p1 : p2
      
          property bool switchPalette: false
      
          Palette {
              id: p1
              buttonText: "maroon"
              button: "lavender"
          }
          Palette {
              id: p2
              buttonText: "white"
              button: "black"
          }
          Button {
              text: "Click Me"
              onClicked: switchPalette = !switchPalette
          }
      }
      

      We should add a snippet like this to https://doc.qt.io/qt-6/qml-qtquick-item.html#palette-prop and then link to it from e.g. https://doc.qt.io/qt-6/qtquickcontrols-customize.html.

      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
            mitch_curtis Mitch Curtis
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes