Programmers learn & share
0 votes
26 views

Problem :

Facing following error
this application failed to start because it could not find or load the qt platform plugin "xcb"
by (6.9k points)   | 26 views

1 Answer

0 votes

Solution :

You need to make sure that you have installed the platform plugins when you try to deploy your application. Depending on that you need to deploy things, there are mainly two methods to tell your application the location where the platform plugins are at runtime which should work for you.

To export the path to the directory through the QT_QPA_PLATFORM_PLUGIN_PATH variable.

e.g QT_QPA_PLATFORM_PLUGIN_PATH=path/to/plugins ./my_qt_app

or

export QT_QPA_PLATFORM_PLUGIN_PATH=path/to/plugins
./my_qt_app

The other option, which is to create a qt.conf file in the same directory which contains your executable. The contents of which would be:

[Paths]
Plugins=/path/to/plugins
by (36.1k points)  
2,204 questions
2,600 answers
59 comments
241 users