1. 程式人生 > >Qt5.9.4+OpenGL除錯筆記:QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

Qt5.9.4+OpenGL除錯筆記:QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

最近專案開發需要用到qml,因為qml需要依賴OpenGL庫,所以重新配置相關環境。

一、開發環境

1.核心版本

[email protected]:~# uname -a
Linux marsboard 4.1.15 #1 SMP PREEMPT Mon Dec 19 13:55:17 CST 2016 armv7l GNU/Linux

2.檔案系統

採用yocto編譯出來的對應的核心4.1.15版本的檔案系統

3.Qt版本

採用qt5.9.4版本,下載原始碼手動編譯的qt庫(編譯時配置了OpenGL的路徑,具體後面再詳述)

4.硬體

開發板採用的是天嵌imx6Q系列,uboot和核心也是移植的官方提供的4.1.15版本(可以從天嵌官網提供的百度網盤下載)。

注意據官方資料imx6 Sololite不支援OpenGL,

二、Qt庫移植及Qt程式執行

1.庫移植

虛擬機器上編譯出來的庫檔案如下:

將qt庫移植到開發板,lib拷貝到了/usr/lib,plugins、qml拷貝到了/usr/lib/qt5

2.Qt程式的編譯

如果自己編譯Qt庫,那就需要手動修改路徑cd /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/會有一個default.conf配置檔案,可以修改預設配置檔案為你編譯好的Qt庫路徑,具體不再詳述。

3.執行環境變數配置

[email protected]:~# export EGLFS_DEVICE_INTEGRATION= eglfs_viv
[email protected]
:~# export QT_QPA_PLATFORM=eglfs [email protected]:~# ls bright [email protected]:~# ./bright QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' QEglFSVivIntegration 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 Unable to query physical screen size, defaulting to 100 dpi. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters). Facade::initializeCommand() ApplicationFacade::initializeCommand() Facade::initializeCommand() QMetaObject::connectSlotsByName: No matching signal for on_toolButton_clicked() write begin at "01:47:36.388" >>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<< write finished at "01:47:36.388" qrc:/qml/PowerSetting.qml:2:1: module "QtQuick.Controls" is not installed qrc:/qml/PowerSetting.qml:5:1: module "QtQuick.Extras" is not installed qrc:/qml/PowerSetting.qml:1:1: module "QtQuick" is not installed qrc:/qml/PowerSetting.qml:6:1: module "QtQuick.Controls.Styles" is not installed qrc:/qml/PowerSetting.qml:3:1: module "QtQuick.Layouts" is not installed qrc:/qml/PowerSetting.qml:4:1: module "QtQuick.Dialogs" is not installed qrc:/qml/PowerSetting.qml:2:1: module "QtQuick.Controls" is not installed qrc:/qml/PowerSetting.qml:5:1: module "QtQuick.Extras" is not installed qrc:/qml/PowerSetting.qml:1:1: module "QtQuick" is not installed qrc:/qml/PowerSetting.qml:6:1: module "QtQuick.Controls.Styles" is not installed qrc:/qml/PowerSetting.qml:3:1: module "QtQuick.Layouts" is not installed qrc:/qml/PowerSetting.qml:4:1: module "QtQuick.Dialogs" is not installed qrc:/qml/PowerSetting.qml:2:1: module "QtQuick.Controls" is not installed qrc:/qml/PowerSetting.qml:5:1: module "QtQuick.Extras" is not installed qrc:/qml/PowerSetting.qml:1:1: module "QtQuick" is not installed qrc:/qml/PowerSetting.qml:6:1: module "QtQuick.Controls.Styles" is not installed qrc:/qml/PowerSetting.qml:3:1: module "QtQuick.Layouts" is not installed qrc:/qml/PowerSetting.qml:4:1: module "QtQuick.Dialogs" is not installed qrc:/qml/PowerSetting.qml:2:1: module "QtQuick.Controls" is not installed qrc:/qml/PowerSetting.qml:5:1: module "QtQuick.Extras" is not installed qrc:/qml/PowerSetting.qml:1:1: module "QtQuick" is not installed qrc:/qml/PowerSetting.qml:6:1: module "QtQuick.Controls.Styles" is not installed qrc:/qml/PowerSetting.qml:3:1: module "QtQuick.Layouts" is not installed qrc:/qml/PowerSetting.qml:4:1: module "QtQuick.Dialogs" is not installed qrc:/qml/PowerSetting.qml:2:1: module "QtQuick.Controls" is not installed qrc:/qml/PowerSetting.qml:5:1: module "QtQuick.Extras" is not installed qrc:/qml/PowerSetting.qml:1:1: module "QtQuick" is not installed qrc:/qml/PowerSetting.qml:6:1: module "QtQuick.Controls.Styles" is not installed qrc:/qml/PowerSetting.qml:3:1: module "QtQuick.Layouts" is not installed qrc:/qml/PowerSetting.qml:4:1: module "QtQuick.Dialogs" is not installed qrc:/qml/PowerSetting.qml:2:1: module "QtQuick.Controls" is not installed qrc:/qml/PowerSetting.qml:5:1: module "QtQuick.Extras" is not installed qrc:/qml/PowerSetting.qml:1:1: module "QtQuick" is not installed qrc:/qml/PowerSetting.qml:6:1: module "QtQuick.Controls.Styles" is not installed qrc:/qml/PowerSetting.qml:3:1: module "QtQuick.Layouts" is not installed qrc:/qml/PowerSetting.qml:4:1: module "QtQuick.Dialogs" is not installed QObject::connect: Cannot connect (null)::sendPowerValueToWidget(QString) to CentralPanel::on_setPowerData(QString) QObject::connect: Cannot connect CentralPanel::sigSendPowerInitData(QString) to (null)::recFromWidget(QString) QObject::connect: Cannot connect (null)::closeView() to QQuickWidget::close()
[email protected]
:~# ^C [email protected]:~# export QML2_IMPORT_PATH=/usr/lib/qt5/qml [email protected]:~# ./bright QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' QEglFSVivIntegration 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 Unable to query physical screen size, defaulting to 100 dpi. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters). Facade::initializeCommand() ApplicationFacade::initializeCommand() Facade::initializeCommand() QMetaObject::connectSlotsByName: No matching signal for on_toolButton_clicked() write begin at "01:53:06.210" >>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<< write finished at "01:53:06.211"

如上所述,環境變數配置完畢就可以看到介面了,qml頁面正常載入。

總結:

1.QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'這個好像不影響頁面顯示

2.天嵌官方提供的4.1.15核心支援OpenGL,這點很重要

相關推薦

Qt5.9.4+OpenGL除錯筆記QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

最近專案開發需要用到qml,因為qml需要依賴OpenGL庫,所以重新配置相關環境。 一、開發環境 1.核心版本 [email protected]:~# uname -a Linux marsboard 4.1.15 #1 SMP PREEMPT Mon D

OpenGL學習筆記(七)建立第一個Qt5.9.3 OpenGL工程模版(與平臺無關)

        main.cpp中輸入原始碼,原始碼如下: #include <iostream> #include <process.h> #include <GLFW/glfw3.h> #include <glad/glad.h> #include <

Qt5.9.4中配置opengl的glut庫(Windows)

Qt本身不包括glut工具庫,如果要使用glut庫,該怎麼做呢?下面來簡述一下Qt下怎麼安裝glut庫。OpenGL只是一個標準,它的實現一般自帶在作業系統裡,只要確保顯示卡驅動足夠新就可以使用。如果需

OpenGL學習筆記常用物件的建立及使用

·頂點陣列物件(Vertex Array Object,VAO) 頂點陣列物件(Vertex Array Object,VAO),用來記錄頂點的資訊,如:位置、資料格式、紋理座標等。使用VAO的好處是:在配置繪製物件的頂點屬性時,你只需要配置一次(VAO會自動記錄你的設定),想要繪製物件

OpenGL學習筆記GLAD和第一個視窗

環境 系統:Windows10 64位 家庭中文版 IDE:Visual Studio 2017 專業版 參考教程:https://learnopengl-cn.github.io/01 Getting started/03 Hello Window/ 步驟 1.獲取GLAD

OpenGL學習筆記編譯GLFW庫

環境 系統:Windows10 64位 家庭中文版 IDE:Visual Studio 2017 專業版 工具:CMake 步驟 1.安裝CMake,CMake最新安裝包:64位 32位; 2.下載GLFW原始碼包,並解壓(記住解壓的路徑,等下要用到,如:D:\glfw-3.2.

【教程】QT5.9.4 + opencv3.0.0編譯配置

QT5.9.4 + opencv3.0.0編譯配置 1. 安裝QT5.9.4 QT下載地址:http://download.qt.io/archive/qt/ 安裝完畢之後將以下目錄加入到系統環境變數: E:\Qt\Qt5.9.4\5.9.4\mingw53_32\bin

【教程】CentOS7 x64 安裝QT5.9.4

CentOS7 x64 安裝QT5.9.4 安裝gcc-c++ yum -y install gcc gcc-c++ 下載Qt 下載地址: http://download.qt.io/archive/qt/ 安裝必要執行庫 yum -y install me

Qt5.9.4搭建Android開發環境

一個自己摸爬滾打的小白 記錄貼 目錄 一、 素材準備 二、 具體操作 三、 測試環境(apk應用例項) 素材準備 1.QT:Qt 5.9.4 2.JDK:jdk-8u101-windows-i586.exe 3.SDK:android-sdk_r24.4.1-windows.

Win10+MSVC2017+QT5.9.4開發環境

一、QT5.9.4開發方式 1) 目的使用Win10下安裝QT5.9.4,使用QtCreator開發,QtCreator集成了MSVC2017_32    MSVC2017_64以及MinGW_32的

ping故障的除錯筆記arp快取

現象 簡化後的網路拓補結構如圖,主機和裝置分別位於不同的子網中。 現象如下:裝置在其網路配置不變的情況下,每當重啟之後,需要經過幾十秒(甚至幾分鐘)的時間,才可以ping通主機。 除錯 在裝置端ping主機,同時使用tcpdump抓包進行除錯: tcpdump -i

Python學習筆記Convert UTF-8 with BOM to UTF-8 without BOM in Python

前言 windows對於utf-8編碼的檔案自帶BOM,但是其他系統utf-8編碼預設不帶BOM。 這就造成在某些情況下字元解碼會出現問題,比如python自帶的json在讀取在window下編碼得來的utf-8檔案時,會報如下錯誤: V

java.lang.IllegalStateException onMeasure() did not set the measured dimension by calling setMeasur

今天自定義Recycleview時,呼叫 adapter.notifyDataSetChanged(); 報異常,異常資訊如下:  java.lang.IllegalStateException: View with id 2131230785: com.example.sma

GIT上傳下載報錯[You do not have permission to pull from the repository]的解決方案!

git報錯:You do not have permission to pull from the repository 解決方案:修改windos憑據 第一步:開啟我的電腦 第二步:選擇此電腦,右擊彈出框點選屬性進入控制面板 第三步:進入控制面板 第四步

Linuxreadonly option is set (add ! to override)錯誤

在使用vim修改完一些配置檔案時,當你退出時經常會出現’readonly’ option is set (add ! to override)的問題,通常有三種情況: 1、 該錯誤為當前使用者沒有許可權對檔案作修改,這種情況可以強制退出:q!,先取得root許

Spring Boot下使用JPA報錯'hibernate.dialect' not set的解決辦法

Spring Boot  下使用JPA,報org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set錯誤,

2017-9-4學習筆記

基類 mysql密碼 fault 高級 問題 ble 代碼 skip rip 一丶socketserver模塊 SocketServer內部使用 IO多路復用 以及 “多線程” 和 “多進程” ,從而實現並發處理多個客戶端請求的Socket服務端。即:每個客戶端請求連接到

OpenGL學習筆記4紋理

原始影象資料 畫素包裝 影象資料在記憶體中很少以緊密包裝的形式存在。在許多硬體平臺上,處於效能上的考慮,一幅影象的每一行都應該從一種特定位元組對齊地址開始。絕大多數編譯器會自動把變數和緩衝區放置在一個針對該架構對齊優化的地址上。 例如一個包含3個分量的

Opencv學習筆記(2)在VS2012中配置Opencv2.4.9專案

最新的opencv版本出到了2.4.9,本文將探討如何在vs2012中配置opencv2.4.9庫。關於vs2012的安裝就不討論了,想必對大家來說都很容易啦。廢話不多說,下面開始: 一、Opencv2.4.9的下載及解壓。 1.      下載opencv2.4.9 ,

9.Laravel5學習筆記在laravel中註冊自己的服務到容器中

pri script -128 ring nts date require 一次 name 問題描寫敘述 或許標題寫的不夠清楚。實際情況是,在我使用laravel的過程中。須要將自己的一個類,通過服務提供者註冊到IOC容器中,可是在實際操作過程中。