嵌入式Qt程序启动参数-qws

1 背景

    通过串口终端启动arm开发板(linux系统)的Qt应用程序,提示:

[root@FORLINX6410]# /opt/qt-4.7.1/demos/textedit/textedit                       
s3c-nand: 1 bit(s) error detected, corrected successfully                       
QWSSocket::connectToLocalFile could not connect:: No such file or directory     
QWSSocket::connectToLocalFile could not connect:: No such file or directory     
QWSSocket::connectToLocalFile could not connect:: No such file or directory     
QWSSocket::connectToLocalFile could not connect:: No such file or directory     
QWSSocket::connectToLocalFile could not connect:: No such file or directory     
QWSSocket::connectToLocalFile could not connect:: No such file or directory     
No Qt for Embedded Linux server appears to be running.                          
If you want to run this program as a server,                                    
add the "-qws" command-line option. 
    根据提示,加上-qws参数后,可以正确启动。

2 WQS

    根据参考资料[2]的说明,QWS的全称是Qt windows system,是QT自行开发的窗口系统,体系结构类似X Windows,是一个C/S结构,由QWS Server在物理设备上显示,由QWS Client实现界面,两者通过socket进行彼此的通讯。在很多嵌入式系统里,QT程序基本上都是用QWS来实现,这样保证程序的可移植性。

3 QPA

    参考资料[5]P18指出,Qt5中已经抛弃了QWS框架,改为使用QPA框架。


参考资料

[1]qt 程序启动参数 -qws

[2]QT中QWS的含义

[3]关于QWSServer

[5]《Qt5编程入门》

你可能感兴趣的:(嵌入式Qt程序启动参数-qws)