How to Maintain 500 qt ui widget form in a single Application. Is it Possible to separate as form application as Module or library. If it is possible, how to links each modules.Is it possible to create separate folders for each modules.
-
2I am having a rather hard time to understand what exactly you are asking. Do you want to move the ui widgets (and their code) from your main application to a library / other project? – CharonX Apr 26 '18 at 09:11
1 Answers
How to Maintain 500 qt ui widget form in a single Application.
It doesn't matter. You can maintain even 100000+ widget forms. Or even create widgets in runtime with code or with .ui files. It depends on your source folder structure, your build system and your wishes.
Is it Possible to separate as form application as Module or library.
Yes, it is. You may store your widgets to a statically linked library or to a dynamic linked library, or whatever you want.
If it is possible, how to links each modules.
You may link both (static or dynamic libraries) in compile time, or load them in runtime. To link in compile time just use your build system to specify dependencies. To link in runtime you may use QLibrary
.
But for Qt application it is a good practice to use Qt plugins. Here is a good example of a widget in separated module.
Is it possible to create separate folders for each modules.
Yes, it is possible. You need to put your modules to folders and to load them with relative path. For example: QLibrary("./modules/mywidgets").load()
.
Or if you are using Qt plugins, just add qt.conf file to your resources or application folder.

- 8,801
- 1
- 35
- 61