Qt : C++ dynamic parameter GUI for plugin paramete

2019-04-12 11:04发布

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?

7条回答
放荡不羁爱自由
2楼-- · 2019-04-12 11:31

I needed to do something similar a year or so ago; didn't find anything then to make it easier and quicker (link). Can't share it I'm afraid. Role your own.

Obvious, but I reverse-engineered XML generated by the Designer app and made some interfaces to re-generate common blocks of XML. Keep in mind that the XML might change in later Qt releases and I had unit tests to validate my own XML was valid.

查看更多
登录 后发表回答