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

qmlsc doesn't like uint Q_PROPERTIES

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.0 Beta1
    • 6.4.0 Beta1
    • QML: Compiler
    • None
    • All
    • b68aa525883ca9ca8e007de3c5b5177fc49af5f4

    Description

      Given this C++ gadget class

       class QmlLot
      {
          Q_GADGET
          QML_NAMED_ELEMENT(Lot)
          QML_UNCREATABLE("")
          Q_PROPERTY(uint alternateId READ alternateId WRITE setAlternateId)
          ...
      }

      then creating a QML property

          property Lot bllot

      and accessing it:

       Warning: View.qml:226:56: Type "uint" of property "alternateId" not found. This is likely due to a missing dependency entry or a type not being exposed declaratively.
                              property color tagColor: bllot.alternateId ? "red" : "blue"
                                                             ^^^^^^^^^^^
      Error: View.qml:226:56: Could not compile binding for tagColor: Cannot load property alternateId from BrickLink::QmlLot of (component in src/mobile/View.qml)::bllot with type BrickLink::QmlLot.
                              property color tagColor: bllot.alternateId ? "red" : "blue"
                                                             ^^^^^^^^^^^
      

      s/uint/unsigned int/ in Q_PROPERTY doesn't make it any better

      Attachments

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

        Activity

          People

            max.goldstein Maximilian Goldstein
            rgriebl Robert Griebl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes