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

Accessing staticQtMetaObject

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P4: Low
    • Some future release
    • 4.3.0
    • Qt Script
    • None

    Description

      The QtScript tetrix example currently contains very ugly code for getting access to the staticQtMetaObject (Qt namespace). Since using this object is something you might want to do in other apps as well, it would be nice if there were a convenient way to access it. Perhaps we could add a QScriptEngine::qtNamespaceObject() function, so you can just do

      QScriptEngine engine;
      engine.globalObject().setProperty("qt", engine.qtNamespaceObject());

      You then have access to enums and flags in the Qt namespace in script code (e.g. qt.Key_Left).

      Attachments

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

        Activity

          People

            kenthans Kent Hansen (Inactive)
            ezf ezf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes