3 ms·
"It's also possible to use the same XML documents to dynamically generate the UI, but I never saw a project using that in any way." This application: https://g
by sbuttgereit 7y ago
"It's also possible to use the same XML documents to dynamically generate the UI, but I never saw a project using that in any way."
This application: https://github.com/xtuple/qt-client https://github.com/xtuple/qt-client, does precisely that.
It's an ERP application, the bulk of the system uses the XML files to generate into C++ as is usually the case, but they use the dynamic approach as a means by which to offer ad hoc customization support for their clients. In that case, and assuming a fully bespoke form, you use Qt Designer to create the XML ui file as you normally would, but that XML ui file ends up in a text field in the database rather than getting compiled into a C++ application. When the form is loaded, the C++ application loads the XML ui from the database, along with JavaScript to back it, and then dynamically renders the UI using the XML definition. On its own, that technique actually works surprisingly well for that use case and isn't distinguishable from the compiled forms in regard to function or performance at a practical level... maybe some delay in opening the form if the network is slow.
Disclosure: My consultancy is a business partner of the company that makes that application.