常州制作公司网站,网页设计师多少钱一个月,网页游戏大全官网,网站页面设计合同前言
板子带有屏幕#xff0c;那当然要设计一下 GUI#xff0c;对 Qt5 比较熟悉#xff0c;那就移植它吧。
移植 Qt5
buildroot 使能 Qt5#xff0c;这里我们只开启核心功能 gui module -- widgets module 编译
$ make ODIY_V3S/ qt5base编译报错#xff1a;找不…前言
板子带有屏幕那当然要设计一下 GUI对 Qt5 比较熟悉那就移植它吧。
移植 Qt5
buildroot 使能 Qt5这里我们只开启核心功能 gui module -- widgets module 编译
$ make ODIY_V3S/ qt5base编译报错找不到 “sybfront.h”头文件 原因是qt 依赖一些库而这些库是我之前编译的之前的 toolchain 没有使能 c 所以要把依赖的库重新编译一下 查看 qt5base 的依赖
$ make ODIY_V3S/ qt5base-show-depends
freetype host-perl host-pkgconf host-skeleton libglib2 skeleton toolchain zlib重新编译 perl就好了
调试
指定平台
拷贝一个之前编译好的 Qt 应用程序到板子运行
rootv3s-diy:~/qt# ./lyj_test_0401
qt.qpa.plugin: Could not find the Qt platform plugin eglfs in
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: linuxfb, minimal, offscreen, vnc.Aborted运行报错提示找不到平台插件其实我们是有的
rootv3s-diy:~/qt# ls /usr/lib/qt/plugins/platforms/
libqlinuxfb.so libqminimal.so libqoffscreen.so libqvnc.so只不过没有告诉 Qt 应用程序或者说告诉 Qt 动态库要使用哪个 有两种方式告诉它 方式一命令行参数
rootv3s-diy:~/qt# ./lyj_test_0401 -platform linuxfb方式二环境变量
rootv3s-diy:~# export QT_QPA_PLATFORMlinuxfb:tty/dev/fb0
rootv3s-diy:~# echo $QT_QPA_PLATFORM
linuxfb:tty/dev/fb0
rootv3s-diy:~/qt# ./lyj_test_0401运行后可以显示图像了但是文字不显示并且命令行有报错
rootv3s-diy:~/qt# ./lyj_test_0401
QFontDatabase: Cannot find font directory /usr/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.
QFontDatabase: Cannot find font directory /usr/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.添加字库
从报错信息可以看到是缺少字库 从之前的板子中拷贝一份字库过来
# mkdir /usr/lib/fonts
# cp SourceHanSansCN-Regular.otf /usr/lib/fonts运行
rootv3s-diy:~/qt# ./lyj_test_0401程序运行正常画面显示正常。
至此Qt5 移植 OK。