Plugin linking error with conan qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
-
You seem to be using a static build of Qt. Is that correct ?
-
wrote 26 days ago last edited by
Yes I think that it is correct, it ran with default options which is that it be built static (I am pretty sure looking at the default options on the conan recipe github).
-
Then you should follow the static plugin howto.
-
wrote 24 days ago last edited by Remnant
Hello so I have looked around and I am not entirely sure what package I am supposed to link with
qt_import_plugins()
I have looked around and I have not found any good plugin to import I do not understand where to find the list of plugins to import to ensure bridging to wayland
-
There's indeed no list however you can lookup for QXyzPlugin in Qt's sources under the src/plugins folders.
-
wrote 23 days ago last edited by
. ├── _clang-format ├── cmake ├── CMakeLists.txt ├── CMakeUserPresets.json ├── coin ├── configure ├── configure.bat ├── configure.json ├── CONTRIBUTING.md ├── LICENSES ├── qt3d ├── qt5compat ├── qtactiveqt ├── qtbase ├── qtcharts ├── qtcoap ├── qtconnectivity ├── qtdatavis3d ├── qtdeclarative ├── qtdoc ├── qtgraphs ├── qtgrpc ├── qthttpserver ├── qtimageformats ├── qtlanguageserver ├── qtlocation ├── qtlottie ├── qtmqtt ├── qtmultimedia ├── qtnetworkauth ├── qtopcua ├── qtpositioning ├── qtquick3d ├── qtquick3dphysics ├── qtquickeffectmaker ├── qtquicktimeline ├── qtremoteobjects ├── qtscxml ├── qtsensors ├── qtserialbus ├── qtserialport ├── qtshadertools ├── qtspeech ├── qtsvg ├── qttools ├── qttranslations ├── qtvirtualkeyboard ├── qtwayland ├── qtwebchannel ├── qtwebengine ├── qtwebsockets ├── qtwebview ├── README.md └── README.md.template
Hi so I am not entirely sure how the conan recipe is made but looking inside the src folder inside .conan2 I have the impression it has not been compiled exactly from a clone of the github. The only interesting thing I found was in the examples of qtwayland folder the inclusion of the Qt::WaylandCompositor in the CmakeLists but when I run cmake it does not find that package.
-
GitHub is just a mirror.
If you want a full Qt checkout, there's a script in the qt5 repo that will do that properly. However that is not the subject here.
The plug-in you are after should be in the qtwayland submodule.
I was just thinking about something, you should have the libraries and plugins build somewhere on your filesystem. There you should be able to see exactly what is available. -
wrote 21 days ago last edited by Remnant
.So I have found the include dir with a little bit of grepping and this is what I have found inside the include files. there is Qt6::Wayland compositor and qtClient
├── QtConcurrent ├── QtCore ├── QtDBus ├── QtDesigner ├── QtDesignerComponents ├── QtDeviceDiscoverySupport ├── QtEglFSDeviceIntegration ├── QtEglFsKmsGbmSupport ├── QtEglFsKmsSupport ├── QtFbSupport ├── QtGui ├── QtHelp ├── QtInputSupport ├── QtKmsSupport ├── QtNetwork ├── QtOpenGL ├── QtOpenGLWidgets ├── QtPrintSupport ├── QtSql ├── QtTest ├── QtTools ├── QtUiPlugin ├── QtUiTools ├── QtWaylandClient ├── QtWaylandCompositor ├── QtWaylandEglClientHwIntegration ├── QtWaylandEglCompositorHwIntegration ├── QtWaylandGlobal ├── QtWidgets ├── QtWlShellIntegration └── QtXml
Then This is my CMakeLists file
cmake_minimum_required(VERSION 3.15) project(MyQtApp) find_package(Qt6 REQUIRED COMPONENTS Core GUI WaylandCompositor) set(CMAKE_CXX_STANDARD 17) qt_import_plugins(Qt6::WaylandCompositor) qt_add_executable(MyQtApp main.cpp) target_link_libraries(MyQtApp PUBLIC Qt6::Core Qt6::Gui qt::qt Qt6::WaylandCompositor)
with a CMake Error saying package not found only on Qt6::WaylandCompositor or WaylandClient
and Qt6WaylandCompositor is also present in the cmake directory
-
wrote 21 days ago last edited by
I am also a bit lost why does QLibraryInfo link to my .conan2 folder (does this indicate from where the binaries were built)?
-
It was rather the librairies folder that you should have looked in.
I think the name of the plug-in is QWaylandIntegrationPlugin.
-
wrote 21 days ago last edited by Remnant
Okay so I have found the solution to this question you have to export these environment vars
QT_QPA_PLATFORM_PLUGIN_PATH (somewhere in /usr/lib)
QT_PLUGIN_PATH (somewhere in /usr/lib)then run your app and it should work. I still have some obscure issues but this got me further. I'll open another post if my other problems persist
-
-
wrote 20 days ago last edited by
Thank you for having taken the time to answer
-
Glad you found a solution and thanks for sharing ! :-)
-
13/16