/*********************************************************************************
* Buildroot Qt 5
* 说明:
* 试一下在Buildroot编译Qt 5,直接编译出来的文件系统是不用配置一堆的环境的。
*
* 2017-11-22 深圳 南山平山村 曾剑锋
********************************************************************************/ 一、参考文档:
. ArchLinux Qt eglfs
https://www.raspberrypi.org/forums/viewtopic.php?t=79771
. QT5中全屏显示子窗口和取消全屏的方法
http://www.cnblogs.com/chihirosan/p/5139022.html 二、测试说明:
. buildroot中选择需要的Qt模块;
. make clean(最好clean一下,我在没有clean的时候编译有报错);
. Ubuntu安装QtCreator IDE;
. 设置QtCreator Tools --> Options的GCC Compilers、Qt Versions Qmake路径,配置Kits;
. 创建一个HelloWorld工程;
. Build Project,以发行版编译;
. 拷贝编译后的程序到ARM主板上,运行输出信息如下,在屏幕上可以看到一个框框:
# ./HelloWorld
This application failed to start because it could not find or load the Qt platform plugin "eglfs"
in "". Available platform plugins are: linuxfb, minimal, offscreen. Reinstalling the application may fix this problem.
Aborted
# ./HelloWorld -platform linuxfb
. 在buildroot中可以选中qt-webkit-kiosk模块进行测试
. # qt-webkit-kiosk -platform linuxfb
. # qt-webkit-kiosk --help
This is a simple web-browser working in fullscreen kiosk-mode. Usage: -h --help Print usage and exit
-v --version Print version and exit
-c --config options.ini Configuration INI-file
-u --uri http://www.example.com/ Open this URI, home page
-C --clear-cache Clear cached request data #
. 全屏显示:
setParent();
showFullScreen();