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

Style hints not properly exported

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 6.6
    • 6.5
    • QML: Compiler

    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

        Activity

          People

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

            Dates

              Created:
              Updated: