【发布时间】:2021-04-16 05:56:12
【问题描述】:
我在 Ubuntu 18.04 上为我的 Raspberry pi 4 交叉编译了 Qt 5.14.1,
对于我的应用程序,我需要 arcs,当我搜索时我发现 arc 属于 QtQuick.Studio.Components 1.0 https://doc.qt.io/qtdesignstudio/qml-qtquick-studio-components-arc.html
但是当我在main.qml 中添加import QtQuick.Studio.Components 1.0 时出现错误QML module not found (QtQuick.Studio.Components 1.0 ) import paths : /opt/RaspberryQt/sysroot/usr/local/RaspberryQt/qml
所以在我的.pro 文件中我添加了
QML_IMPORT_PATH = /opt/RaspberryQt/sysroot/usr/local/RaspberryQt/qml
但我仍然有这个错误
这些是我在交叉编译之前安装在 Raspberry pi 4 上的库。你能告诉我缺少哪一个吗?
sudo apt-get build-dep qt5-qmake
sudo apt-get build-dep libqt5gui5
sudo apt-get build-dep libqt5webengine-data
sudo apt-get build-dep libqt5webkit5
sudo apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0 gdbserver
这是我的配置
cd /opt/RaspberryQt/build
../qt-everywhere-src-5.14.1/configure -release -opengl es2 -eglfs -device linux-rasp-pi4-v3d-g++ -device-option CROSS_COMPILE=/opt/RaspberryQt/tools/rpi-gcc-8.3.0/bin/arm-linux-gnueabihf- -sysroot /opt/RaspberryQt/sysroot -prefix /usr/local/RaspberryQt -opensource -confirm-license -skip qtscript -skip qtwayland -skip qtwebengine -nomake tests -nomake examples -make libs -pkg-config -no-use-gold-linker -v -recheck
提前谢谢你
【问题讨论】:
标签: qt import qml cross-compiling pi