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

Style hints not properly exported

    XMLWordPrintable

Details

    Description

      Code like

      import QtQuick
      
      Window {
          id: win
          width: 640
          height: 480
          visible: true
          title: "Sandbox"
      
          Rectangle {
              width: 100
              height: 100
              color: "green"
      
              MouseArea {
                  anchors.fill: parent
                  cursorShape: enabled && Qt.styleHints.useHoverEffects ? Qt.PointingHandCursor : Qt.ArrowCursor
              }
          }
      }
      

      makes the compiler claim

      Warning: main.qml:28:55: Property "useHoverEffects" not found on type "QObject" [missing-property]
                      cursorShape: enabled && Qt.styleHints.useHoverEffects ? Qt.PointingHandCursor : Qt.ArrowCursor
                                                            ^^^^^^^^^^^^^^^
      Warning: main.qml:28:55: Could not compile binding for cursorShape: Cannot load property useHoverEffects from QObject of QtObject::styleHints with type QObject. [compiler]
                      cursorShape: enabled && Qt.styleHints.useHoverEffects ? Qt.PointingHandCursor : Qt.ArrowCursor
                                                            ^^^^^^^^^^^^^^

      .

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-109381
          # Subject Branch Project Status CR V

          Activity

            People

              qtqmlteam Qt Qml Team User
              cajus Cajus Pollmeier
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change