/********************************************************************************* * Buildroot Qt 5 * 說明: * 試一下在Buildroot編譯Qt 5,直接編譯出來的文件系統是不用配置一堆的環境的。 * * 2017-11-22 深圳 南山平山村 曾劍鋒 ********************************************************************************/ 一、參考文檔: 1. ArchLinux Qt eglfs https://www.raspberrypi.org/forums/viewtopic.php?t=79771 2. QT5中全屏顯示子窗口和取消全屏的方法 http://www.cnblogs.com/chihirosan/p/5139022.html 二、測試說明: 1. buildroot中選擇需要的Qt模塊; 2. make clean(最好clean一下,我在沒有clean的時候編譯有報錯); 3. Ubuntu安裝QtCreator IDE; 4. 設置QtCreator Tools --> Options的GCC Compilers、Qt Versions Qmake路徑,配置Kits; 5. 創建一個HelloWorld工程; 6. Build Project,以發行版編譯; 7. 拷貝編譯后的程序到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 8. 在buildroot中可以選中qt-webkit-kiosk模塊進行測試 1. # qt-webkit-kiosk -platform linuxfb 2. # 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 # 9. 全屏顯示: setParent(0); showFullScreen();