0

I recently downloaded QT and am attempting to familiarize myself with it. However, I cannot get the example projects to run! When I try to run one of the examples, it exits with a message such as this:

Starting C:\Qt\Examples\Qt-5.4\build-gui-Desktop_Qt_5_4_1_MinGW_32bit-Debug\rasterwindow\debug\rasterwindow.exe...
This application failed to start because it could not find or load the Qt platform plugin "windows".

Available platform plugins are: minimal, offscreen.

Reinstalling the application may fix this problem.
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
C:\Qt\Examples\Qt-5.4\build-gui-Desktop_Qt_5_4_1_MinGW_32bit-Debug\rasterwindow\debug\rasterwindow.exe exited with code 3

I have seen several questions about this error, but all of them are using Visual Studio. I am just using the default QT editor, and have made no changes to the example project. Additionally, when I try write a basic application that will simply create a window, it runs with no error message but no window is created. I can still write a "hello world" program that uses cout but QT won't create a widget window.

I am on Windows 7 32 bit, using default Qt editor. Did I skip some important step during installation? I just ran the installer executable.

Vincent
  • 484
  • 3
  • 9
  • are you trying to start the `.exe` in that folder? or does that happen when you run the project out of QtCreator? – deW1 Apr 17 '15 at 18:09
  • @deW1 When I run it from QtCreator – Vincent Apr 17 '15 at 18:23
  • Available platform plugins are: minimal, offscreen. there should be windows as well O.o so it looks like you're missing the windows platform plugin. I would reinstall it http://www.qt.io/download-open-source/ – deW1 Apr 17 '15 at 18:25
  • 1
    Did you build Qt yourself? What is the exact URL of the file you downloaded and installed Qt from? – Kuba hasn't forgotten Monica Apr 17 '15 at 18:38
  • @KubaOber I downloaded it from http://www.qt.io/download-open-source/ – Vincent Apr 27 '15 at 15:16
  • 1
    Possible duplicate of [Qt5 Static Build yields Failed to load platform plugin "windows"](http://stackoverflow.com/questions/16773789/qt5-static-build-yields-failed-to-load-platform-plugin-windows) – Jim G. Oct 30 '16 at 13:10

1 Answers1

0

The error is caused because the program can't find qwindows.dll.

You should check qwindows.dll in platforms directory.

.../platforms/qwindows.dll

Hoang Pham
  • 114
  • 6
  • qwindows.dll exists in the directories C:\Qt\5.4\mingw491_32\plugins\platforms and C:\Qt\Tools\QtCreator\bin\plugins\platforms. Is that correct? – Vincent Apr 27 '15 at 15:14
  • Yes, it's in `C:\Qt\5.4\mingw491_32\plugins\platforms` directory. Have you solved this problem? – Hoang Pham May 01 '15 at 16:05