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

Accessing staticQtMetaObject

XMLWordPrintable

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

      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).

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes