How to make my application scriptable
-
wrote on 5 Sept 2014, 12:19 last edited by
I've got a C++-QML-application and would like to allow my users to create their own plugins for it.
All I'd need to expose is a string that changes time after time.I'd want the users to be able to create a single Tab inside a TabView of my application.
I've read QJSEngine is the way to go but I've no clue where to start.
-
wrote on 5 Sept 2014, 14:08 last edited by
Hmm, why so complicated? You create a plugin folder, all qml files inside this folder could be load from your application. For every file you create a tab and load the qml inside of it.
-
wrote on 5 Sept 2014, 14:15 last edited by
Ok that sounds ok but still how do I expose a variable or call a function in these QML-plugins upon a variable change in my application?
-
wrote on 5 Sept 2014, 14:18 last edited by
You create signals and slots, make a documentation so every plugin developer can inform about possible signals and functions to call. So the developer only need to connect to or send a signal in his plugin.
-
wrote on 15 Sept 2014, 07:45 last edited by
Please add [SOLVED] to your thread title if it's solved