My Qt based application is extensible via plugins ( http://doc.qt.io/archives/4.6/plugins-howto.html#the-lower-level-api-extending-qt-applications) .
These plugins can have its own parameters.(int,double,String, enumerations..etc)
What I want to do is, define this parameters in an XML and generate the GUI dynamically by parsing the XML file.
I found somewhat similar architecture here - http://www.slicer.org/slicerWiki/index.php/Slicer3:Execution_Model_Documentation#Slicer3_GUI_Generation
Is there any library/framework that I can use with Qt for this.Or do I have to manually write my own code from parsing XML,mapping parameters into Maps , generate GUI checking the XML element...etc
Any tips?
You can programmatically create
*.ui
files, see the XML schema. Then you can render them on the fly with QtUiTools.You might want to look into QML.
If you are using Qt and their plugin system, you should be able to define a function that returns a UI element from the plugin. You could then just show that element, and have the element itself handle configuring the plugin however it needs to be done. It seems simpler than going through an XML interface to specify everything.
Also, you can use QScript, to control UI and what you want.
Please note that Slicer4 is based on Qt. I don't know if the GUI-generation part is ported already. Link to the alpha announcement and further information:
http://slicer-users.65878.n3.nabble.com/Slicer-4-0-alpha-td1448047.html
Tulip has such a mechanism, it is based on C++/Qt : http://tulip.labri.fr/TulipDrupal/ I think that the dev team defined it's own type to replace QVariant, in which they pass the plugin arguments. They can support various primary types, default arguments, various types of plugins, ...
Source code is available at : http://sourceforge.net/projects/auber/files/