简体   繁体   中英

Why is Qt Creator's core a plugin?

Do you have a clear explanation why they have chosen the core of the application to be a plugin like the other components, and not just a basic shared library? I cannot see any clear advantages, besides the 'coolness' of the design.

I got an answer from the developers themselves:

Qt Creator doesn't aim to be an application framework. "Core" being a plugin has mostly academical reasons, though eg one practical advantage is that in that way the core of Qt Creator automatically has a "version", and the check if a plugin is compatible with Qt Creator is done the exact same way as with any other plugin dependencies. Also the whole startup initialization (including the initialization of the other plugins) is done the same way which leads to same concept and there is less to learn.

As to "why" we can only guess. In their own documentation they state:

Qt Creator is extensible in various ways. For example, Qt Creator architecture is based on a plugin loader, which means that all functionality beyond plugin loading is implemented in plugins. However, you can extend and tweak many parts of Qt Creator without the need to resort to coding in C++ and implementing such a plugin.

So from this one could gather that this choice was made with extensibility in mind. I'm not sure if the answer to "why is the core a plugin?" is anything more than "why not?". If you are creating your application to be, as they say, a plugin loader, then why not keep it as "light" on functionality as possible and make the core a plugin as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM