【Qt】Ubuntu下Qt应用程序自启动设置
生活随笔
收集整理的這篇文章主要介紹了
【Qt】Ubuntu下Qt应用程序自启动设置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1、問題描述
第一步,確保手動啟動Qt程序沒有報錯!如果報以下錯誤,參見博客
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: xcb.
第二步,在Ubuntu系統中設置自啟動腳本,例如在 /etc/rc.local 文件中添加啟動腳本,但是在自啟動時報錯:
*******XOpenDisplay Fail *******
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in <
總結
以上是生活随笔為你收集整理的【Qt】Ubuntu下Qt应用程序自启动设置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Qt】获取本地IP(IPv4)
- 下一篇: 【JavaScript】Ubuntu16