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

QML value types can't be defined with qmetatype ids > 255

    XMLWordPrintable

Details

    Description

      Trying to create a value type for the qtlocation qml import. I have set up the actual data class (a POD class with operator= and copy cons), a subclass of QQmlValueTypeBase<POD>, and a subclass of QQmlValueTypeProvider (with all the appropriate private bool methods overridden). I then call QQml_addValueTypeProvider() with an instance of the QQmlValueTypeProvider subclass that I defined, and also call qmlRegisterValueTypeEnums on the QQmlValueTypeBase subclass.

      At this point, it doesn't seem to work. The methods I defined in the provider never get called for properties of the POD type. I discussed this with mvogt and chriadam and it seems value types are only accepted at present for qmetatype ids < 255 (and of course being a custom qmetatype, my POD class gets a much higher id).

      Attachments

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

        Activity

          People

            mvogt Matthew Vogt (closed Nokia identity) (Inactive)
            alewilso Alex Wilson (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes