[Qt-creator] What are advantages to have Core plugin over MainWindow?!?

Christian Gagneraud chgans at gmail.com
Wed Aug 15 11:15:06 CEST 2018


On 15 August 2018 at 20:43, Eike Ziller <Eike.Ziller at qt.io> wrote:
>
>
>> On 14. Aug 2018, at 21:40, Szyk Cech <szykcech at spoko.pl> wrote:
>>
>> Hi
>> I just read some docs "Extending Qt Creator Manual" and study qt-creator/src/app/main.cpp file. And I have question (maybe not very wise but important to me):
>>
>> What are advantages to have Core plugin over MainWindow?!?
>>
>> I mean MainWindow class which handle whole app skeleton (located in main app exe module).
>>
>> One reason for core plugin, from my point of view is that core plugin is shared object which can easily share its methods to other plugins - I think it is possible for exe (app exe module), but counter intuitive and cumbersome, and platform specific.
>>
>> There are some more reasons for create Core plugin?
>
> Handling it as just another plugin has the advantage that it uses the exact same startup, shutdown, building, linking, .... semantics as anything else. No need to invent something else :)

Really? like QtCreator's main() doesn't have special handling for the
core plugin...
Last time I checked, the core plugin was loaded explicitly and require
(lot of) hand-crafted initialisation. If Core plugin is "just" another
plugin, why it is not loaded as a result of being the root dependency
of every other plugins?
I understand Eike's point of view, but I agree with Szyk, the 'Core'
plugin could very well be managed as a 'Core' Library.
QtCreator will refuse to start without it. This IMHO contradicts the
very definition of a plugin.

Having say that, QtCreator is awesome, and it's even more awesome to
be able to study its source code (and criticise it! ;)), I believe
that many of us have learned a lot of things by studying it's
architecture, at least I did.
Thanks again.

Chris

PS: I remember reading some (old) slides that started with "QtCreator
is actually just a plugin loader" or something along these lines.

>
> --
> Eike Ziller
> Principal Software Engineer
>
> The Qt Company GmbH
> Rudower Chaussee 13
> D-12489 Berlin
> eike.ziller at qt.io
> http://qt.io
> Geschäftsführer: Mika Pälsi,
> Juha Varelius, Mika Harjuaho
> Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator



More information about the Qt-creator mailing list