主题 : 成功移植QTE4.5.3到开发板,可是执行程序时为什么总要加个qws啊? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 7430
精华: 0
发帖: 26
金钱: 175 两
威望: 72 点
综合积分: 52 分
注册时间: 2009-07-15
最后登录: 2011-07-03
楼主  发表于: 2009-11-15 12:05

 成功移植QTE4.5.3到开发板,可是执行程序时为什么总要加个qws啊?

刚刚把QTE4.5.3移植到开发板上,用的是非图形界面文件系统root_default.img ,可是在我执行 ./hello 时提示: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.

而在
[root@FriendlyARM /hello]# ./hello -qws  之后就正常了,不知道是为什么?请高手解答一下,另外如何做才能做到把这个qws去掉也能执行QT程序啊??谢谢了!!


级别: 新手上路
UID: 7430
精华: 0
发帖: 26
金钱: 175 两
威望: 72 点
综合积分: 52 分
注册时间: 2009-07-15
最后登录: 2011-07-03
1楼  发表于: 2009-11-15 12:15

 回 楼主(lsw9934003) 的帖子

另外我在最开始的时候好像还提示个这个错误:[root@FriendlyARM /hello]# ./hello
Qt for Embedded Linux data directory is not owned by user 0
Aborted
后来我[root@FriendlyARM /]# chown root:root /tmp/qtembedded-0/
但提示chown: /tmp/qtembedded-0/: Operation not permitted
然后我就重启了瞎,也不知道怎么的就好了,但是那个qws还是要加,不知道为什么???
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2009-11-15 15:28
你为什么不先去想想-qws参数是什么意思?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-11-17 17:47

 回 3楼(zl39049979) 的帖子

不要误导小朋友,这里的Server指的不是X Window的X Server,而是Qt for Embedded Linux自己的Server进程,虽然它做的事情和X Server差不多。参考http://doc.trolltech.com/4.5/qt-embedded-architecture.html

A Qt for Embedded Linux application requires a server application to be running, or to be the server application itself. Any Qt for Embedded Linux application can act as the server. When more than one application is running, the subsequent applications connect to the existing server application as clients.

The server and client processes have different responsibilities: The server process manages pointer handling, character input, and screen output. In addition, the server controls the appearance of the screen cursor and the screen saver. The client process performs all application specific operations.
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2009-11-17 21:29

 回 5楼(zl39049979) 的帖子

呵呵,不过玩程序可不能出一点点错,否则结果就相差十万八千里了
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 7430
精华: 0
发帖: 26
金钱: 175 两
威望: 72 点
综合积分: 52 分
注册时间: 2009-07-15
最后登录: 2011-07-03
5楼  发表于: 2009-12-10 09:23
明白了,谢谢大家了!
级别: 新手上路
UID: 11441
精华: 0
发帖: 9
金钱: 75 两
威望: 33 点
综合积分: 18 分
注册时间: 2009-12-08
最后登录: 2011-09-19
6楼  发表于: 2009-12-14 14:46
因为要运行QTE应用程序,必须创建一个进程作为GUI服务器,服务器负责为客户端分配屏幕区域,生成鼠标和键盘事件,只要加上-qws,可以使应用程序成为一个服务器
级别: 新手上路
UID: 7794
精华: 0
发帖: 26
金钱: 160 两
威望: 44 点
综合积分: 52 分
注册时间: 2009-07-29
最后登录: 2017-09-13
7楼  发表于: 2009-12-18 09:21
楼主可否将移植过程分享一下,我在移植的时候发现将qte中 的例程移植到板子上会发现段错误