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

color property on QtQuick Window doesn't work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 5.2.1
    • Fix Version/s: 5.2.1
    • Labels:
      None
    • Environment:
      Windows 7 64bit MinGW 4.8

      Description

      The following link states "Setting this property is more efficient than using a separate Rectangle."

      https://qt-project.org/doc/qt-5.1/qtquick/qml-qtquick-window2-window.html#color-prop

      However you get the warning (and no window shown):

      Warning: QQml_colorProvider: no color provider has been set!
      QQmlApplicationEngine failed to load component
      main.qml:13 Invalid property assignment: color expected

      import QtQuick.Window 2.0
      
      Window {
      
          title: "My Application"
      
          visible: true
      
          width: 200
          height: 100
      
          color: "black"
      }
      

      If I change to using an ApplicationWindow from QtQuick.Controls then it works fine.

      import QtQuick.Controls 1.1
      
      ApplicationWindow {
      
          title: "My Application"
      
          visible: true
      
          width: 200
          height: 100
      
          color: "black"
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            liaqi Liang Qi
            Reporter:
            miketrahearn Mike Trahearn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes