Qt has such an interesting tool as Qt UI Tools , which allows you to reconstruct serialized widgets.
This can be useful, for example, if in a client-server application the server will be responsible not only for the main logic, but also influence the formation of the user interface. For example, because there are modules assembled into a single system, each of which has its own configuration dialogs.
Of course, it will not be difficult to organize your own protocol to describe the settings of these modules, but suppose that this is difficult because the process of changing each of the options in the settings dialog requires the organization of some intermediate data exchange between the server and the client. Because of this, an arbitrary protocol grows strongly due to the various conditions added to it.
In this regard, it would be very convenient if the server module somehow fully described the entire widget (set of widgets), described the data that should be contained in this widget (data generated in runtime ), and finally - the code that should be performed with some user actions on the widget.
The first and second is implemented in an obvious way. Any widget can be serialized on the server side, and reproduced already on the client side. The runtime data of the program, which must be placed in the reconstructed widget, can be transferred separately, and according to some general rules, the client part will bring it into the newly created widget.
But what about, for example, that if a widget contains a button, and for one module this button should do one thing, and another for another? How to transfer the execution logic so that the data exchange protocol between the server and the client does not start to grow under various conditions?
Please share the experience of the implementation of the designated mechanism, and if you used QUiLoader or, perhaps, QFormBuilder , then you passed the actual code / logic of individual widgets. In general, the question arises, why do we need the same QUiLoader , if we pass on the widget the opportunity is there, but what should it do - no?
A possible solution to the problem, I see the use of plugins. Plug-ins could be transferred over the network as files, even QUiLoader not required here. But the accompanying expansion of the application project is very disturbing, since every single plugin is actually a subproject.