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

Can't set palette for Window

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.0.0, 6.0.1, 6.1.0 Alpha
    • Fix Version/s: 6.1, 6.2.0 Alpha, 6.3.0 Alpha
    • Component/s: Quick: Other
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      249db12b6020cc3a8f04841b1e28cd529f4929d9 (qt/qtdeclarative/dev) e7b03676349ba309d0c0bb3392d7b0cf701e9a53 (qt/qtdeclarative/6.2)

      Description

      Qt's documentation says there's a property called "palette" in Window, and it was introduced in Qt 6.0, however, when I was trying to set a QPalette to it, the QML engine warns about "palette" is a non-existent property and failed to load the component.

      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
          palette.mid: "purple"
      
          Rectangle {
              anchors.fill: parent
              color: palette.mid
          }
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            mitch_curtis Mitch Curtis
            Reporter:
            wangwenx190 赵 宇航
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes