Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

qt.qpa.plugin: Could not find the platform plugin "qt" in "" when deploying application bundle.



  • I have an application bundle for X11 platforms which contains a platforms subdirectory with the libqxcb.so plugin. All dependencies are included in my lib subdirectory which I add to the LD_LIBRARY_PATH on startup. This normally works fine, except for the inability to render OpenGL to QQuickFrameBuffers. To resolve this issue I tried compiling qt with the -qt-qpa option in an attempt to make the rendering code as platform independent as possible. Now I get this error when running my application budnle

    qt.qpa.plugin: Could not find the platform plugin "qt" in "" 
    

    In my Qt installations platforms directoy there is no plugin named libqt.so or similar. Only libqxcb.so, liblinuxfb.so etc. I have also copied these plugins and on startup the application reports

    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    
    Available platform plugins are: linuxfb, minimal, offscreen, vnc, wayland, webgl, xcb.
    
    

    Where is the qt platform plugin? I cannot find it on the list of plugins here: https://doc.qt.io/qt-5/qpa.html


  • Lifetime Qt Champion

    Hi,

    What version of Qt are you using ?
    How are you deploying your application ?



  • When Qt is compiled with -qt-qpa it expects to find a platform plugin named "qt". Thus it makes no sense to compile with -qt-qpa. I could override the platform plugin by setting the QT_QPA_PLATFORM environment variable before running the application.


Log in to reply