[Solved] Both qml and c++
-
Hi. I have written an application with Qt 5.2 using both c++ and qml.
Now if I try to run it using QT 5.3.0 I obtain the error "QtQuick is not installed".
I see that the wizard for create a new QtQuick application is not the same as in the past. I suppose that QtQuick is very changed now.Does anybody can send me a simple application with both c++ and Quick 2.0?
-
Hi,
You can use "QQuickView":http://qt-project.org/doc/qt-5/qquickview.html instead of QQmlApplicationEngine in Qt 5.3.0 so that you wont need to change existing QML files.
@
QQuickView *view = new QQuickView;
view->setSource(QUrl("qrc:/main.qml"));
view->show();
@ -
import QtQuick 2.0
qrc:Qml/Qml/QMMainForm.qml:1:1: module "QtQuick" is not installed
-
The problem happens when I add to the resource file the file qt.conf with this resource path: ""/qt/etc/qt.conf.
The file contains
[Paths]
Plugins=plugins
Libraries=libs -
Solved by coping the directory Qt/Qt5.3.1/5.3/gcc/qml/ in the application dir.