Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt5 QML error QtQuick QtGraphicalEffects is not installed

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?

like image 201
jtomaszk Avatar asked May 29 '13 10:05

jtomaszk


2 Answers

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.

like image 151
TheBootroo Avatar answered Oct 13 '22 10:10

TheBootroo


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
like image 28
RzR Avatar answered Oct 13 '22 12:10

RzR