标题:求助Qt Quick程序在arm上运行出错,如何解决?
作者:downing
日期:2014-07-02 15:44
内容:
我下载了最新的qt-everywhere5.3.1版本的,交叉编译移植到板子上以后直接创建了一个Qt Quick程序放到板子上跑,提示了如下错误,网上找不到解决方法,求如何解决这个问题,感谢。
# ./qmlpng
QEglFSImx6Hooks will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
QQmlApplicationEngine failed to load component
qrc:///main.qml:1 module "QtQuick" is not installed
qrc:///main.qml:2 module "QtQuick.Controls" is not installed
qrc:///main.qml:1 module "QtQuick" is not installed
qrc:///main.qml:2 module "QtQuick.Controls" is not installed
#1 [leonchiong 07-03 10:01]
请问你用的什么板子
我用过友善的板子 不过好像目前只支持到Qt4
#2 [joeycheng 07-04 17:10]
没有指明qml的路径,在环境里添加:export QML2_IMPORT_PATH=$QTDIR/qml就能解决qrc:///main.qml:1 module "QtQuick" is not installed这样类似的问题,$QTDIR/qml是你编译安装后会有个文件夹的。
不过我还是没能继续跑起来,我遇到以下问题:
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaB
#3 [joeycheng 07-04 17:12]
或者试试export QML_IMPORT_PATH=$QTDIR/qml,不是很清楚具体是什么,可能是建立的工程不同而不同。。。
#4 回 joeycheng 的帖子 [downing 08-22 13:42]
joeycheng:或者试试export QML_IMPORT_PATH=$QTDIR/qml,不是很清楚具体是什么,可能是建立的工程不同而不同。。。 (2014-07-04 17:12)
谢谢你的回答,确实是加上export QML2_IMPORT_PATH=$QTDIR/qml这句话解决了可以运行了,这些
QEglFSImx6Hooks will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
只是警告而已,让运行起来的quick程序强制全屏且无法退出界面只能重启板子。
另外谢谢其他人的回复,就不一条条感谢了
#5 [wakorias 10-09 19:33]
楼主,问你你交叉编译5.3.2的时候,./configure后的选项都有哪些?