Question

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?

Was it helpful?

Solution 2

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

OTHER TIPS

this command fixed my problem.

sudo apt -y install qml-module-qtquick-controls

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

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 cding inside the respective module directories, executing qmake followed by make -j4 (for faster building use parallel make) and finally make install.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top