8
votes

After successful compilation of project, I have get an executable file.

When I type ./program in 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'm using QtQuick 2.0, Qt5 and Ubuntu, QtQuick and QtGraphicalEffects are in ~/Qt5.0.2/5.0.2/gcc/qml/ I have install fresh Qt SDK from site project.

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

Could anyone help?

3

3 Answers

4
votes

This is because Windows or whatever OS you use doesn't know the location of Qt install directory and it can't find the QML plugins sub-dir when you run app outside QtCreator.

You have to take the following directories from your SDK install and copy them beside your executable (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.

3
votes

Just make sure to have the package installed

I see you mentioned about Ubuntu, if using 14.04 , you can install it by typing this command line :

sudo apt-get install libqt5qml-graphicaleffects

And if it's not found it you can still look for package name on debian based distros :

apt-file search 'qml/QtGraphicalEffects/qmldir'
libqt5qml-graphicaleffects: /usr/lib/x86_64-linux-gnu/qt5/qml/QtGraphicalEffects/qmldir
0
votes

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

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

After that it started working!

You can also add this to the "Build Environment" at the project page if the previous setting does not solve your problem. And restart QtCreator.