November 25, 2013

Romaniy Romaniy
Lab Rat
11 posts

Could not find or load the Qt platform plugin “windows”

 

Hello everyone!

I have just compiled new application, which works perfectly well.
But when i tried change library path inside my application, I’ll saw next problem during starting my program:

This application failed to start because it could not find or load the Qt platform plugin “windows”.

Application works normal, when I don’t change library path.
I want, that my application works in any computer, without installing Qt library.
I added library in this way:

  1.   a.addLibraryPath(a.applicationDirPath() + "/plugins/");

“plugins” directory exists in this path.
When I started application with old library path I’ll saw next:

(“D:/build-A_1-Desktop_Qt_5_1_1_MinGW_32bit-Release/release/plugins”, “C:/Qt/Qt5.1.1/5.1.1/mingw48_32/plugins”, “D:/build-A_1-Desktop_Qt_5_1_1_MinGW_32bit-Release/release”)

But when I renamed this directory “C:/Qt/Qt5.1.1/5.1.1/mingw48_32/plugins”, my application stopped working with the same error.

Please help me:)

4 replies

November 25, 2013

raven-worx raven-worx
Mad Scientist
1608 posts

and where is your platform plugin located?
You need to preserve Qt’s plugin directory structure . Meaning you just can set the base-path for plugins, which contains the subfolders “imageformats”, “platforms”, … and the respective plugin libraries then.

November 25, 2013

Romaniy Romaniy
Lab Rat
11 posts

raven-worx, thank for your response)

I copied directory plugins with all subdirectories from C:/Qt/Qt5.1.1/5.1.1/mingw48_32/plugins to my application directory.
My plugin directory consists:

Directory of D:\build-A_1-Desktop_Qt_5_1_1_MinGW_32bit-Release\release\plugins

25.11.2013 12:10 <DIR> .
25.11.2013 12:10 <DIR> ..
22.11.2013 13:34 <DIR> accessible
22.11.2013 13:34 <DIR> bearer
22.11.2013 13:34 <DIR> designer
22.11.2013 13:34 <DIR> iconengines
22.11.2013 13:34 <DIR> imageformats
22.11.2013 13:34 <DIR> mediaservice
22.11.2013 13:34 <DIR> platforms
22.11.2013 13:34 <DIR> playlistformats
22.11.2013 13:34 <DIR> printsupport
22.11.2013 13:34 <DIR> qml1tooling
22.11.2013 13:34 <DIR> qmltooling
22.11.2013 13:34 <DIR> sensorgestures
22.11.2013 13:34 <DIR> sensors
22.11.2013 13:34 <DIR> sqldrivers 0 File(s) 0 bytes 16 Dir(s) 11 077 955 584 bytes free

But it didn’t help:(

November 25, 2013

SGaist SGaist
Mad Scientist
6885 posts

Hi,

IIRC, you should move the platforms folder from plugins to release

 Signature 

Need programers to hire ? www.edeltech.ch

November 25, 2013

Romaniy Romaniy
Lab Rat
11 posts

Yes, it’s help.
Thanks.

 
  ‹‹ How embed the online help in the application      QMAKE_LFLAGS_SONAME - how I use it? ››

You must log in to post a reply. Not a member yet? Register here!