Hi,
I’ve been experiencing this problem from time to time for a month and more.

I do know the error ‘Failed to load platform plugin "windows” ‘, it is because 
a ‘platforms’ folder should be there with my application.

But copying ‘platforms’ folder and others is what I should do when deploying.
I need a convenient way to debug a Qt application. It’s too heavy to copy all 
these dependent dlls and plugins to the project folder whenever I create a 
small Qt project.

In normal condition, When I press F5 (Start Debugging) in Visual Studio, it 
will start an new debug instance, loading all dependent Qt dlls and plugins 
from $(QTDIR). The ‘platforms’ folder is located at $(QTDIR)\plugins. I don’t 
copy it to my application’s folder, but it can find the plugins.

But sometimes things go bad. When I press F5 (Start Debugging), it can find Qt 
dlls like Qt5Guid.dll,Qt5Quickd.dll, and so on from $(QTDIR)\bin, but can’t 
find plugins from $(QTDIR)\plugins
When it can’t find the plugin, this condition will last long time.

And I copied the QtDir to another machine then it works well there.

What may the problem be? In normal condition, what mechanism do Qt use to find 
these plugins when debugging a program? I guess QtVSAddin is handling these. So 
is it a Bug of QtVSAddin ?

I’m using Visual Studio 2010 and QtVSAddin 1.2.1 (the problem also exist when 
I’m using QtVSAddin 1.2.0)

Thank you :)

By the way,
the thread I post a month ago: http://qt-project.org/forums/viewthread/26001/
And I found another thread discussing this: 
http://qt-project.org/forums/viewthread/22908
HarrySatt faced the problem when starting a debug session. Finally, he bypassed 
the problem by setting the enviroment variable QT_QPA_PLATFORM_PLUGIN_PATH. I 
don’t think it’s a good way.

------------------------------------------------------------------
Wei Yuemin
7FGame

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to