Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Problem with QtQuick Controls
hi, i'm new in this forum, i finish a development of one application, i work on Qt5.1.0 openGL version, with MSVC 2010 in a precompiled version, but when i try execute my application in a clean environmente, i get a error with QtQuickControls (with checkbox.qml and combobox.qml), the console says cannot load plugin for a module , and cannot load library, y try put a directories QtQuick, QtQuick.2 and QtQml, the structure of a directory of application is this:
- ui*.qml files
Did you try to have Qt* Directories inside a qml directory?
- ui*.qml files
Yes, but then the error message is "module QtQuick is not installed"
Did you compile it to a exe? "ref ":http://doc-snapshot.qt-project.org/qt5-nosubdir/qtquick-deployment.html
well, thanks for your reply, but i searched and find a QmlComponents how replace CheckBox and ComboBox, and are works fine. In the future i try again a use QtQuickControls in a application.
I have the same problem when deploying an app on Windows with Qt Quick Controls and Qt 5.2.0. I get an error message on the command line saying "Cannot load library <SOME_PATH>/qtquickcontrolsplugin.dll". I double-checked <SOME_PATH> and the file definitely exists there. Moreover, I copied the file to varies subdirectories in my deployment folder without any success.
Thanks for any comments on this.
Try following this guide: http://qt-project.org/wiki/Deploy_an_Application_on_Windows
thanks for your reply. I followed the tutorial and copied all the files to their respective locations. But still I get a blank screen. :-(
However, as stated above the problem seems to be with the Qt Quick Controls plugin. Has anybody ever deployed an application on Windows using Qt Quick Controls???
onek24 last edited by
have you tried to deploy it statically or dynamically? There was a thread about half a day ago with maybe the same problem, it's not solved yet.
"QML project can’t be run by Static Qt linking version , Qt 5.2":http://qt-project.org/forums/viewthread/38356/
If you are building dynamically you could try to make qtquickcontrols and place them in your folder. You can find the resources here:
I tried to deploy it dynamically. Static linking/deploying Qt/QML applications seems to be broken anyway since a couple of weeks and I think it's not even supported for QML applications.
Anyway I tried to deploy dynamically and I added all dll's from my Qt directory according to the link provided by JKSH. Even the qtquickcontrols.dll is included there but still there is a problem when loading this file although it's definitely there in the filesystem - once in the Qt directory and once in my own deployment folder.
I am really praying for a button "Deploy on Windows" in the next Qt Creator release as there are so many people having problems with the deployment process,
Any comments on this are very welcome.
- Does your app work when you run it in Qt Creator?
- How many versions of Qt do you have installed?
- Can you please provide screenshots of (i) your deployment folder, and (ii) your error message?
Yes, Give us the directory structure of your deployment folder and the error message you get (or screenshot of it).
onek24 last edited by
Have you checked your dependencies? Probably something is missing which would be needed by qtquickcontrols.dll?
[quote author="JKSH" date="1392363736"]
Does your app work when you run it in Qt Creator?
How many versions of Qt do you have installed?
Can you please provide screenshots of (i) your deployment folder, and (ii) your error message?[/quote]
Yes, it's working in Qt Creator
I have only Qt 5.2.0 installed.
My deployment folder is 1,5 GB!!! (including a lot of debug dlls but anyway) My executable is "P4UGui.exe". Here are some screenshots:
As already state above the file qtquickcontrolsplugin.dll is present in the folder deployment/QtQuick/Controls.
Thank you for the screenshots.
Please follow Step #2 of the "Initial deployment" section of the guide properly. You don't have all DLLs.
Where did you download this copy of Qt 5.2.0 from?
Where did you get D3DCompiler_43.dll from?
Do you have a file called "qtquick2controlsapplicationviewer.h" in your project? If so, please copy+paste its contents here.
Well I have to admit that you are right. ;-)
I copied ALL dlls from the ming48_32/bin folder and now it works. Finally my deployment folder holds 3 GB and now I will try to reduce this size step by step. I will update this post and tell you which dll I was missing finally.
Still I am wondering why the application doesn't complain about missing dlls as it used to do if you are missing e.g. Qt5Core.dll or Qt5Gui.dll. Furthermore, I used Dependency Walker and not even this one reported any missing dlls.
some dll are load at runtime, I always use Dependency Walker with profiling. http://www.dependencywalker.com/help/html/hidm_execute.htm
Ok finally I managed to squeeze down my deployment folder to 110 MB and it still works!!! I am pretty sure that I can further reduce memory as there might be a couple of more stuff in the folders Qt, QtQuick and QtQuick.2 which I actually do not need. Nevertheless, the only library I was missing in the end was Qt5Widgets.dll. I don't quite understand why this one is needed as I am actually using QML only for GUI.
Anyway....for your reference I attach another screenshot of the final working deployment folder. Maybe somebody else can make some use of it in the future.
Thanks again for your help......and your patience. ;-)
Thanks man. I didn't know about the profiling of Dependency Walker but it looks very useful to especially find the libraries which are loaded at runtime.
[quote author="dasun" date="1392478127"]some dll are load at runtime, I always use Dependency Walker with profiling. http://www.dependencywalker.com/help/html/hidm_execute.htm[/quote]
You are welcome. Please mark this thread as solved :)
Glad to hear that you've succeeded! And thank you for sharing your final setup with the community.
[quote author="frankem" date="1392480026"]the only library I was missing in the end was Qt5Widgets.dll. I don't quite understand why this one is needed as I am actually using QML only for GUI. [/quote]Currently, Qt's styling capabilities are all located in the Qt Widgets module. Qt Quick Controls use these styles to look like native controls on your platform.
I'd imagine that the styling code would be refactored in Qt 6, so that we don't have Qt Quick apps relying on Qt Widgets code anymore. (The code can't be moved Qt 5.x unfortunately, because that would break binary compatibility)
[quote author="JKSH" date="1392517394"]Currently, Qt's styling capabilities are all located in the Qt Widgets module. Qt Quick Controls use these styles to look like native controls on your platform.[/quote]
Ah, I see. Thanks for this clarification.
Unfortunately, I am not able to mark the thread as "SOLVED" as I am not the owner.
I am running Visual Studio 2012 64 bit with QT 5.2.1 and I am running into this problem also. I saw the problem with both the OPEN GL version and the non Open GL version.
I have enclosed my screen shot, I also took the time to make sure that the VS 2012 redistributables were in place. Any Suggestions?
ML debugging is enabled. Only use this in a safe environment.
rc:/qml/main.qml:2:1: plugin cannot be loaded for module "QtQuick.Controls": Ca
not load library C:/Users/Andrew/Documents/GitHub/deploy/bin_debug/QtQuick/Cont
ols/qtquickcontrolsplugind.dll: The specified module could not be found.
lass QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(void):
ould not initialize egl display: error 12289
tQuick: failed to create OpenGL context
Does this happen while you are running your application from Qt Creator or from a deployment folder?
Is the file C:/Users/Andrew/Documents/GitHub/deploy/bin_debug/QtQuick/Controls/qtquickcontrolsplugind.dll in place?
Try to use the windeployqt.exe program, which gives at least a good starting point for deployment.
Deployment Folder only. I will take a look at it. Thank you.
I tried it and there was a problem. When I renamed my C:\qt to something else, it did not work and I got the white screen. When I had the C:\qt the deployment was correct. What would I be missing? I copied the guide and everything?
I noticed that someone else did a 32 bit deployment in WINDOWS 7 and it worked. I was using QT 5.2.1 64 Bit with Open GL for Visual Studio 2012.
I've only done deployment on Win7 64-bit using Mingw. But the fact that you get a white screen has most probably something to do with missing plugins.
Did you use the windeployqt.exe?
You can try to use Dependency Walker . This will show you all missing DLL's for your binary. From there you can run your binary in a profiling mode (Profile --> Start Profiling [F7]). This should also give you the missing plugin DLL's which get loaded dynamically during startup.
PS.: Have you also added Qt5Widgets.dll to your deployment folder? Even if you are only using QML, I found out that Qt5Widgets is still needed.
[quote author="andrew8165" date="1397583674"]When I renamed my C:\qt to something else, it did not work and I got the white screen. When I had the C:\qt the deployment was correct. What would I be missing? I copied the guide and everything?[/quote]That means you forgot to copy some files. Qt Quick applications need a combination of .dll files, .qml files and qmldir files.
This is the fastest way to get it working: http://qt-project.org/wiki/Deploy_an_Application_on_Windows
I already tried dependency walker and I copied all the necessary DLL's . Again there is different behavior with Windows 8.1 in 64 bit with QT 5.2.1 with Open GL then other distributions. Unfortunately this didn't solve the problem.
[quote author="andrew8165" date="1397644905"]I already tried dependency walker and I copied all the necessary DLL's . Again there is different behavior with Windows 8.1 in 64 bit with QT 5.2.1 with Open GL then other distributions. Unfortunately this didn't solve the problem.[/quote]Did you try the "Quick and Dirty" deployment in the link I posted?
Yes, It did not work properly.