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:

    @ 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:)


  • Moderators

    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.



  • 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:(


  • Lifetime Qt Champion

    Hi,

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



  • Yes, it's help.
    Thanks.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.