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

Style hints not properly exported

XMLWordPrintable

      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
                                                            ^^^^^^^^^^^^^^

      .

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes