Unsolved Compile QT 5.8 to cross-compile Beaglebone
-
sorry for annoying
i just added to a .pro file as usual :
target.path = /usr INSTALLS += target DISTFILES +=
now on my beaglebone /usr/ folder looks like
-
@Andrey-Shmelew You should really upload a bigger picture - it is nearly impossible to see anything. I tried hard but could not find main.qml file there. So, where is it?
-
@Andrey-Shmelew And you should not pollute /usr with files of your app. It is better to use /opt/YOUR_APP_NAME.
-
-
@Andrey-Shmelew That's why it is not working
-
@jsulm
so if i upload main.qml to beaglebone's /usr/ folder then i get :QQuickView only supports loading of root objects that derive from QQuickItem.
If your example is using QML 2, (such as qmlscene) and the .qml file you
loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur.To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the
QDeclarativeView class in the Qt Quick 1 module. -
@Andrey-Shmelew said in Compile QT 5.8 to cross-compile Beaglebone:
QDeclarativeView
It says what you should do: use QDeclarativeView instead of QQuickView
-
This post is deleted! -
ok, i solved the problem:
put manually main.qml into /usr/ foldermain.cpp
#include <QGuiApplication> #include <QQmlApplicationEngine> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("/usr/main.qml"))); return app.exec(); }
-
@Andrey-Shmelew You should take a look at "Installing Files" in http://doc.qt.io/qt-5/qmake-advanced-usage.html to avoid manually copying the file. And you should construct the path at runtime, as I suggested before, else if you change the installation directory later you will need to change your code and rebuild the app.