Raspberry Pi 3上的QML性能 [英] QML Peformance on Raspberry Pi 3

查看:173
本文介绍了Raspberry Pi 3上的QML性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从锉刀的仓库中安装了Qt5.7.编译我的qml程序后,我收到以下消息,而我的qml太慢了:

I've installed Qt5.7 from repository in my rasp. After compiling my qml program I'm getting following messages and my qml is too slow:

libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin
JIT is disabled for QML. Property bindings and animations will be very slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for your platform.
JIT is disabled for QML. Property bindings and animations will be very slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for your platform.
inotify_add_watch("/home/pi/.config/qt5ct") failed: "No such file or directory"

我还启用了openGL驱动程序,还向.pro添加了QMAKE_CXXFLAGS += -mthumb-interwork -mthumb -march=armv7标志,但没有帮助...

I've also enabled the openGL driver and also added QMAKE_CXXFLAGS += -mthumb-interwork -mthumb -march=armv7 flags to the .pro, but didn't help...

推荐答案

您可以尝试启用 Qt Quick编译器.

Qt Quick编译器是Qt Quick应用程序的开发附加组件,它使您可以将QML源代码编译为最终的二进制文件.

The Qt Quick Compiler is a development add-on for Qt Quick applications which allows you to compile QML source code into the final binary.

根据官方文档,您可以尝试使用最新版本的Qt:

You can try a recent version of Qt, according to the official docs:

从Qt版本5.11开始,Qt Quick编译器的功能已集成到Qt Quick模块本身中.在早期的Qt长期支持版本中,仍然可以使用此单独的附件.

Since Qt version 5.11, the functionality of the Qt Quick Compiler has been integrated into the Qt Quick module itself. This separate add-on remains available in the earlier long term support releases of Qt.

如果仍要使用相同版本,只需将其添加到qmake配置文件中即可:

If you still want to use the same version, just add to your qmake configuration file:

CONFIG += qtquickcompiler

您还需要添加编译器标志,如Wiki页面所述:

You also need to add the compiler flags, as mentioned on the wiki page:

QMAKE_CXXFLAGS += -mthumb -mthumb-interwork

最后,请按照以下步骤启用适当的驱动程序:

Finally, enable the proper driver by following these steps:

  1. 打开raspi-config
  2. 转到高级选项"
  3. 转到GL驱动程序
  4. 启用GL(完整KMS)

这篇关于Raspberry Pi 3上的QML性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆