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

Can not register meta type defined using typedef to script engine

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.6.0, 4.6.1, 4.6.2
    • Qt Script
    • None

    Description

      Using the following example:
      typedef int myint;

      myint can be registered as a meta type and used with QVariant by doing:
      Q_DECLARE_METATYPE(myint)

      However registering this data type to a QScriptEngine via qScriptRegisterMetaType(...) will lead to unknown type exceptions.

      "typedef int myint" is a silly example, but the same should be true for any data type defined in this way.

      See attached example that reproduces this behavior.

      Attachments

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

        Activity

          People

            kenthans Kent Hansen (Inactive)
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes