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

Can not register meta type defined using typedef to script engine

XMLWordPrintable

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

      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.

        1. 00091328.zip
          147 kB
          Andy Nichols
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes