[Interest] When does Qt load its plugins?

Elvis Stansvik elvstone at gmail.com
Wed Jul 13 14:14:34 CEST 2016


2016-07-13 14:06 GMT+02:00 Elvis Stansvik <elvstone at gmail.com>:
> 2016-07-13 14:00 GMT+02:00 alexander golks <alex at golks.de>:
>> Am Wed, 13 Jul 2016 12:37:22 +0200
>> schrieb Elvis Stansvik <elvstone at gmail.com>:
>>
>>> 2016-07-13 12:34 GMT+02:00 Elvis Stansvik <elvstone at gmail.com>:
>>> > I'm working on packaging an application using QtWidgets as an AppImage
>>> > and I'm looking at which of the Qt plugins I must bundle.
>>> >
>>> > I'll run an strace while using the application, but I thought I'd also
>>> > ask here: When in general does Qt load its plugins? For some plugins
>>> > (such as the platform plugin), I expect it to be quite early. But what
>>> > about imageformat plugins, is there a policy that they be loaded as
>>> > late as possible?
>>>
>>> To clarify, I wasn't only talking about imageformat plugins, but
>>> plugins in general. The imageformat plugins was just an example where
>>> I suspect they may be loaded as late as possible?
>>>
>>> Elvis
>>>
>>> >
>>> > In short I'm wondering if I must use every nook and cranny of the
>>> > application during my strace run, to catch all plugins, or if it's
>>> > enough to say wait until the QApplication and QMainWindow is up.
>>> >
>>> > Thanks in advance,
>>> > Elvis
>>
>> i would not use strace to get a packaging list for the plugins to deploy.
>> simply use the plugins you want/need.
>>
>> plugins are loaded when requested first time. so its not safe to wait
>> until QApplication and QMainWindow are up.
>
> Alright, yes I realized this after I sent my first mail (see my other
> mail just now).
>
> It's easy to know that if I say want to load JPEGs, I need the
> imageformats/libqjpeg.so plugin. But there are so many plugins in a Qt
> installation it's hard as an application developer to know for sure
> which you need.
>
> In the Qt I'm using to build this AppImage, there's currently:
>

If I'm going to guess a little:

> tmp/usr/lib/qt5/plugins/bearer/libqconnmanbearer.so
> tmp/usr/lib/qt5/plugins/bearer/libqgenericbearer.so
> tmp/usr/lib/qt5/plugins/bearer/libqnmbearer.so

I don't think I need these, since I'm not doing anything with a GPS?

> tmp/usr/lib/qt5/plugins/designer/libcontainerextension.so
> tmp/usr/lib/qt5/plugins/designer/libcustomwidgetplugin.so
> tmp/usr/lib/qt5/plugins/designer/libqquickwidget.so
> tmp/usr/lib/qt5/plugins/designer/libtaskmenuextension.so
> tmp/usr/lib/qt5/plugins/designer/libworldtimeclockplugin.so

These I think are only required by Qt Designer?

> tmp/usr/lib/qt5/plugins/generic/libqevdevkeyboardplugin.so
> tmp/usr/lib/qt5/plugins/generic/libqevdevmouseplugin.so
> tmp/usr/lib/qt5/plugins/generic/libqevdevtabletplugin.so
> tmp/usr/lib/qt5/plugins/generic/libqevdevtouchplugin.so
> tmp/usr/lib/qt5/plugins/generic/libqtuiotouchplugin.so

These ones I'm unsure about, they sound quite important?

> tmp/usr/lib/qt5/plugins/iconengines/libqsvgicon.so

If I want to use SVG icons I'll include this one?

> tmp/usr/lib/qt5/plugins/imageformats/libqgif.so
> tmp/usr/lib/qt5/plugins/imageformats/libqico.so
> tmp/usr/lib/qt5/plugins/imageformats/libqjpeg.so
> tmp/usr/lib/qt5/plugins/imageformats/libqsvg.so

These I'll include according to my requirements, that's easy.

> tmp/usr/lib/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so
> tmp/usr/lib/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so

These ones's I'm unsure about. They could be important.. or are they
just for specialized input methods?

> tmp/usr/lib/qt5/plugins/platforms/libqlinuxfb.so
> tmp/usr/lib/qt5/plugins/platforms/libqminimal.so
> tmp/usr/lib/qt5/plugins/platforms/libqoffscreen.so
> tmp/usr/lib/qt5/plugins/platforms/libqxcb.so

Out of these I think I'll only need the XCB plugin, since my app is
exclusively for X11.

> tmp/usr/lib/qt5/plugins/platformthemes/libqgtk2.so

This one I don't need, unless I want my application to integrate
better in a Gtk-based desktop environment..? (guessing here)

> tmp/usr/lib/qt5/plugins/printsupport/libcupsprintersupport.so

I'll include this if I want CUPS printing support (I think I do).

> tmp/usr/lib/qt5/plugins/qmltooling/libqmldbg_debugger.so
> tmp/usr/lib/qt5/plugins/qmltooling/libqmldbg_inspector.so
> tmp/usr/lib/qt5/plugins/qmltooling/libqmldbg_local.so
> tmp/usr/lib/qt5/plugins/qmltooling/libqmldbg_native.so
> tmp/usr/lib/qt5/plugins/qmltooling/libqmldbg_profiler.so
> tmp/usr/lib/qt5/plugins/qmltooling/libqmldbg_server.so
> tmp/usr/lib/qt5/plugins/qmltooling/libqmldbg_tcp.so

I'm not using QML, so I won't need these?

> tmp/usr/lib/qt5/plugins/sqldrivers/libqsqlite.so

And not SQLite, so no need for this.

> tmp/usr/lib/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so

This one I think is important, but could someone confirm?

So the ones I'm most unsure about are:

plugins/generic/*
plugins/platforminputcontexts
plugins/xcbglintegrations

But I'd really appreciate clarifications on the other ones as well.

Elvis

>
> For some of these it's obvious from their name what they're for, but
> others I have no idea. And I also don't know if they're integral to
> the working of Qt, or if they're expendable (for example the generic/*
> plugins) :/
>
> Elvis
>
>>
>>> _______________________________________________
>>> Interest mailing list
>>> Interest at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>> --



More information about the Interest mailing list