Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
Currently there is no good way to find an exhaustive list of plugin types or plugins that are available in Qt overall, or in a specific build of Qt.
There's a short list at https://doc.qt.io/qt-6/plugins-howto.html#the-high-level-api-writing-qt-extensions
but that doesn't list what CMake packages need to be found to make them available, nor the qmake QTPLUGIN += names.
This list is useful for consumption in the qt_import_plugins cmake api, and for qmake QTPLUGIN variable.
We should offer a way to find out the list of plugins and plugin types.
We probably want an exhaustive list as documentation on doc.qt.io.
And perhaps add a public API to query what plugins are available in the current project, given the project's find_package() calls.
As a workaround, one can currently run the following command in a cmake user project's build directory
cmake . --trace-redirect=log.txt --trace-expand grep QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_ log.txt
which will show results like
6788:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_permissions QDarwinBluetoothPermissionPlugin ) 6884:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_permissions QDarwinCalendarPermissionPlugin ) 6980:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_permissions QDarwinCameraPermissionPlugin ) 7076:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_permissions QDarwinContactsPermissionPlugin ) 7172:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_permissions QDarwinLocationPermissionPlugin ) 7268:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_permissions QDarwinMicrophonePermissionPlugin ) 10737:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_platforms QCocoaIntegrationPlugin ) 10756:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_imageformats QGifPlugin ) 10775:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_imageformats QICOPlugin ) 10794:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_imageformats QJpegPlugin ) 10813:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_platforms QMinimalIntegrationPlugin ) 10832:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_platforms QOffscreenIntegrationPlugin ) 10851:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_generic QTuioTouchPlugin ) 12146:/Users/alex/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicPluginHelpers.cmake(584): list(APPEND QT_ALL_PLUGINS_FOUND_BY_FIND_PACKAGE_styles QMacStylePlugin )
where the suffix '_platforms' part is the 'plugin type' and the value is the 'target name' of the plugin.
Attachments
Issue Links
- relates to
-
QTBUG-135392 Document plugin targets and plugin names
-
- Reported
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-132696 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
641639,11 | Add a plugin description json | dev | qt/qtbase | Status: NEW | 0 | 0 |