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

Can't set palette for Window

    XMLWordPrintable

Details

    • All
    • 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

            mitch_curtis Mitch Curtis
            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