在嵌入式Linux 4.8.5示例中运行Qt
我已经使用安装了Qt for Embedded Linux(Qt 4.8.5)。但是,当我运行QtCreator 3.0.1中安装的任何示例时,会出现以下错误:在嵌入式Linux 4.8.5示例中运行Qt,qt,qt4,Qt,Qt4,我已经使用安装了Qt for Embedded Linux(Qt 4.8.5)。但是,当我运行QtCreator 3.0.1中安装的任何示例时,会出现以下错误: QWSSocket::connectToLocalFile could not connect:: Connection refused No Qt for Embedded Linux server appears to be running. If you want to run this program as a server,
QWSSocket::connectToLocalFile could not connect:: Connection refused
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
选项运行,我会得到:
QScreenLinuxFb::connect: Permission denied Error opening framebuffer
/dev/fb0 The program has unexpectedly finished.
从谷歌搜索结果中,我可以看出它与权限设置有关,可能与帧缓冲区设备(/dev/fb0)有关。以下是我的Ubuntu12.04 LTS系统上的ls-al/dev/fb0
的输出:
$ ls -al /dev/fb0
crw-rw---- 1 root video 29, 0 Apr 21 22:43 /dev/fb0
我已将当前登录的用户添加到/dev/fb0
所属的视频组中。我仍然得到了权限被拒绝的错误
如果我使用sudo
运行/examples/qws/framebuffer
示例,我将获得以下输出:
The framebuffer device was opened successfully.
Fixed screen info:
id: inteldrmfb
smem_start: 0xc0073000
smem_len: 5763072
type: 0
type_aux: 0
visual: 2
xpanstep: 1
ypanstep: 1
ywrapstep: 0
line_length: 6400
mmio_start: 0x0
mmio_len: 0
accel: 0
The framebuffer device was mapped to memory successfully.
Was in graphics mode already. Skipping
Variable screen info:
xres: 1600
yres: 900
xres_virtual: 1600
yres_virtual: 900
yoffset: 0
xoffset: 0
bits_per_pixel: 32
grayscale: 0
red: offset: 16, length: 8, msb_right: 0
green: offset: 8, length: 8, msb_right: 0
blue: offset: 0, length: 8, msb_right: 0
transp: offset: 0, length: 0, msb_right: 0
nonstd: 0
activate: 0
height: -1
width: -1
accel_flags: 0x1
pixclock: 0
left_margin: 0
right_margin: 0
upper_margin: 0
lower_margin: 0
hsync_len: 0
vsync_len: 0
sync: 0
vmode: 0
Frame Buffer Performance test...
Average: 916 usecs
Bandwidth: 6000.102 MByte/Sec
Max. FPS: 1091.703 fps
Will draw 3 rectangles on the screen,
they should be colored red, green and blue (in that order).
Done.
但是,我没有看到屏幕上的3个矩形
有人能帮我概述一下如何在Ubuntu桌面环境下运行这些Qt for Embedded Linux(Qt 4.8.5)示例吗?我也只使用12.04系统,但使用Qt 4.6.1。
我遇到了与您相同的问题,并发现当我从控制台(Ctrl+Alt+F1)终端使用-qws运行时,可以看到GUI。
从GUI终端或Qt Creator运行时,尽管显示了窗口,但操作系统的GUI(X11)在屏幕刷新期间会用其内容覆盖屏幕
如果您希望能够从Qt Creator或GUI操作系统运行Qt GUI应用程序,则qvfb需要在后台运行。
此链接将抛出有关此的一些信息:
希望这有帮助