Qt5 QML error QtQuick QtGraphicalEffects not installed

After successfully compiling the project, I have an executable file.

When I type ./program as a result, I see:

 QML Error: qrc:///qml/main.qml:25:1:module "QtGraphicalEffects" is not installed qrc:///qml/main.qml:24:1:module "QtQuick" is not installed 

I use QtQuick 2.0, Qt5 and Ubuntu, QtQuick and QtGraphicalEffects are in ~/Qt5.0.2/5.0.2/gcc/qml/ I have a new Qt SDK from the site project.

I tried to run this application also on Windows 7, but with the same result.

Can anyone help?

+7
source share
3 answers

This is due to the fact that Windows or any other OS you use does not know the location of the Qt installation directory and cannot find the QML plugins subdirectory when starting the application outside of QtCreator.

You need to take the following directories from the SDK and copy them next to the executable file (and DLL):

 <SDK install path>/<Qt version>/<compiler name>/qml/QtQuick.2 <SDK install path>/<Qt version>/<compiler name>/qml/QtGraphicalEffects 

And it should work fine.

+4
source

Just make sure the package is installed.

I see that you mentioned Ubuntu, if you use 14.04, you can install it by entering this command line:

 sudo apt-get install libqt5qml-graphicaleffects 

And if it is not found, you can still search for the package name in debian-based distributions:

 apt-file search 'qml/QtGraphicalEffects/qmldir' libqt5qml-graphicaleffects: /usr/lib/x86_64-linux-gnu/qt5/qml/QtGraphicalEffects/qmldir 
+3
source

I had the same problem with Qt5.8.0 and QtCreator 4.2.1 the import of QtGraphicalEffects 1.0 was underlined because the module was not found!

I added my path to QtGraphicalEffects 1.0 QML_IMPORT_PATH + = / opt / Qt5.8.0 / 5.8 / gcc_64 / qml / QtGraphicalEffects to the .pro file

After that, he started to work!

You can also add this to the " Build Environment " on the project page if the previous setup did not solve your problem. And restart QtCreator.

0
source

All Articles