開機啟動qt程式

2021-09-28 13:51:49 字數 1629 閱讀 6798

一、正常配置qt環境

1.拷貝qt庫至開發板

cp qtarm32.tar /usr/local 

tar xvf ./qtarm32.tar

2.新增qt環境變數

vi /etc/profile

export qtdir=/usr/local/qt-5.6-arm

export qt_qpa_platform_plugin_path=$qtdir/plugins

export qt_qpa_platform=linuxfb:fb=/dev/fb0

export qt_qpa_fontdir=$qtdir/lib/fonts

export qt_qpa_generic_plugins=evdevtouch:dev/input/event0

export qt_qws_fontdir=$qtdir/lib/fonts/

#export qt_qpa_evdev_mouse_parameters=/dev/input/event?

#export qt_qpa_evdev_touchscreen_parameters=/dev/input/event0:inverty

#export qt_qpa_evdev_keyboard_parameters=/dev/input/event?

export set ld_library_path=$qtdir:$qtdir/lib/:$qt_qpa_platform_plugin_path:$qt_qpa_fontdir:$ld_library_path

3.使檔案生效:重啟或source /etc/profile

一、開機啟動qt應用配置

1.在rc.local文末新增啟動指令碼

vi /etc/rc.local或/

/sw_player/sw.sh  &
指令碼/sw_player/sw.sh 設定環境變數和應用程式

#!/bin/sh

export qtdir=/usr/local/qt-5.6-arm

export qt_qpa_platform_plugin_path=$qtdir/plugins

export qt_qpa_platform=linuxfb:fb=/dev/fb0

export qt_qpa_fontdir=$qtdir/lib/fonts

export qt_qpa_generic_plugins=evdevtouch:dev/input/event0

export qt_qws_fontdir=$qtdir/lib/fonts/

#export qt_qpa_evdev_mouse_parameters=/dev/input/event

#export qt_qpa_evdev_keyboard_parameters=/dev/input/event

export set ld_library_path=$qtdir:$qtdir/lib/:$qt_qpa_platform_plugin_path:$qt_qpa_fontdir:$ld_library_path

/sw_player/sw_player.run -qws &

樹莓派之開機啟動Qt程式

1.因為qt的啟動過程 自動登入 自動啟動視窗 自動執行使用者程式。進入當前使用者home目錄下的.config目錄 這是乙個隱藏的目錄,需要用ls a顯示出來 原理 start x後,lxde視窗管理器會找到 config autostart目錄下的所有.desktop檔案,一一執行。2.具體實現...

Qt設定開機啟動

直接上 ifdef q os win32 qsettings reg hkey current user software microsoft windows currentversion run qsettings nativeformat endif ifdef q os linux 寫.des...

qt設定開機啟動動畫 Qt實現程式啟動動畫

這次我們來演示乙個應用程式啟動時,新增啟動動畫的小例子。所謂啟動動畫,就是說當乙個應用程式啟動時,在展示主視窗之前,有可能會先去初始化一些執行環境,驗證使用者資訊等前提工作。那麼在這段空閒期程式的啟動過程是沒有使用者介面的,而使用者也無法得知程式的狀態,所以就需要在這段空白時間中,向使用者提供乙個展...