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

Details

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

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes