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

Missing namespace qualifier in property declarations for classes intended to be used from QML

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.0.0
    • PIM: Organizer

      For example, using the OrganizerModel from QML gives the following error:

      QMetaProperty::read: Unable to handle unregistered datatype 'QQmlListProperty<QDeclarativeOrganizerItem>' for property 'QtOrganizer::QDeclarativeOrganizerModel::items'

      This seems to be due to missing namespace qualifier in properties for types in the QtOrganizer namespace.

      For example, the code in git:

      Q_PROPERTY(QQmlListProperty<QDeclarativeOrganizerItem> items READ items NOTIFY modelChanged)

      doesn't work but after modifying it to:

      Q_PROPERTY(QQmlListProperty<QtOrganizer::QDeclarativeOrganizerItem> items READ items NOTIFY modelChanged)

      the application works fine.

      QtCreator also shows a lot of errors until the fix is applied.

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

            renatofilho renato araujo oliveira filho
            mario Mario Boikov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes