Getting this error while running my program. I searched the Internet to find QtQuick.Controls
but couldn't get any resolution.
How can I install this?

- 345
- 1
- 2
- 16
-
What is your OS, Qt version and how Qt was installed on your machine? – Kakadu Jan 29 '14 at 13:33
-
OS was Ubuntu 12.10, now upgraded to Ubuntu 13.10. Qt version earlier was 4.8 and now 5.1! QtQuick 2.0 works but `QtQuick.Controls` shows as not installed. – Jino Jan 29 '14 at 16:52
-
Ubuntu 13.10 is still on 5.0. – Gustavo Niemeyer Jan 29 '14 at 18:49
-
That's correct. its showing 5.0.2 – Jino Jan 30 '14 at 04:48
5 Answers
this command fixed my problem.
sudo apt -y install qml-module-qtquick-controls

- 914
- 2
- 16
- 23
You're likely using an old version of Qt. The QtQuick.Controls
module was introduced in Qt 5.1:

- 22,007
- 5
- 57
- 46
-
1
-
2So that's the reason you're getting the error you've asked about. How to upgrade is a different question, which I suggest asking on Ask Ubuntu. – Gustavo Niemeyer Jan 30 '14 at 13:35
-
1I have upgraded to Qt Creator 3.0.0 Based on Qt 5.2.0 (GCC 4.6.1, 32 bit) Built on Dec 10 2013 at 11:47:52... still the same error.. please help! – Jino Jan 31 '14 at 09:27
Another cause of this 'module "Qt*" is not installed' class of problems on Ubuntu at least is the environment variable LD_LIBRARY_PATH
not being set. It should include the path to the lib directory of your Qt installation, e.g.
if [ "x$LD_LIBRARY_PATH" = "x" ]; then
export LD_LIBRARY_PATH=/home/username/Qt5.4.1/5.4/gcc_64/lib
else
export LD_LIBRARY_PATH=/home/username/Qt5.4.1/5.4/gcc_64/lib:$LD_LIBRARY_PATH
fi

- 31
- 1
Here is another answer which covers my case since it's different from what the other two answers give as feedback.
I've built Qt 5.7 for the Raspberry Pi (Raspbian Jessie). From my notebook I transferred a simplistic QML-based project which worked there. However after building the project on my Pi and starting it (note that QML problems often don't show up when you compile and link stuff) I got that very same error. Obviously the version here was not an issue.
The problem was that for some reason I haven't built the qtquickcontrols and qtquickcontrols2 modules in the source tree of my Qt. Luckily I used an USB flash drive for storing the sources and also where I have build my Qt version from these so it was just a matter of cd
ing inside the respective module directories, executing qmake
followed by make -j4
(for faster building use parallel make
) and finally make install
.

- 8,713
- 7
- 76
- 161
For those getting this issue while static building with vcpkg and CMAKE, I followed these steps:
.\vcpkg install qt5-quickcontrols:<target>
I was building statically on a x64 windows platform so my target was x64-windows-static
, more info about the target flag here
- In my CMakeLists.txt, below
target_link_libraries()
I added:
qt5_import_qml_plugins(${PROJECT_NAME} INCLUDE Qt5::qtquickcontrolsplugin)

- 65
- 1
- 6