Load an extensions for the QScriptEngine by subclass QScriptExtensionPlugin



  • Hello everyone,
    this is my first post so I hope to be as clear as possible. I need to load an extension by subclass QScriptExtensionPlugin like the Qt's documentation describes here: Creating Qt Script Extensions. However, I don't understand completely the first way (using QScriptExtensionPlugin) to achieve my goal.

    In the linked page is written that: "QScriptEngine will look for a QScriptExtensionPlugin that provides the relevant extension by querying each plugin for its keys() until a match is found", but the meaning of "look" is not clear to me. How do I make my extension visible to the QScriptEngine? After that the shared library with my extension has been built, what should I do?

    Thank you for any suggestions.



  • I solved the problem!
    Just puts the shared library into a directory named "script", inside the directory where the application binary is placed, and it's done.

    Sorry for the trivial issue :(.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.