为什么QT可以运行没有X服务器和GTK不能 [英] why qt can run without x server and gtk cant

查看:327
本文介绍了为什么QT可以运行没有X服务器和GTK不能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行arago linux的AM335x入门套件上开发基于gstreamer的应用程序。 gst-launch(带有测试管道)给出了正确的命令行输出(串行),但在屏幕上什么也没有显示。顺便说一句,屏幕默认显示一个QT演示应用程序。杀死这个演示程序会导致gst-launch失败。



我编译了一个hello worldgtk应用程序,它给出了Gtk-WARNING **:can not open display:错误。顺便说一句,这里没有X.



但是当我运行Qthello world应用程序时,弹出窗口显示在演示应用程序的顶部。



有人可以解释原因。任何建议来解决这个问题都是值得欢迎的。

UPDATE1:
如果我错了,请纠正我。我想也许使用qt-gstreamer API可能是最简单的方法。

UPDATE2:
我可以使用fbdevsinkgstreamer插件进行这项工作。
感谢所有的指针。

解决方案

这听起来很奇怪。它的绘图和输入需求,GDK为不同的平台和环境使用不同的后端。



X11后端是一个,但也有其他的。



您必须确保您为适合您环境的适当后端构建GDK。


I am developing a gstreamer based app on AM335x starter kit running arago linux. "gst-launch"(with a test pipeline) gives proper command line output (serial) but shows nothing on the screen. BTW the screen by default shows a qt demo app. Killing this demo app makes the gst-launch fail.

I compiled a "hello world" gtk app, which gives "Gtk-WARNING **: cannot open display:" error. BTW there is no X here.

But when I ran a Qt "hello world" app, a pop up window was displayed on top of the demo app.

Can someone please explain why. Any suggestions to solve this are welcome.

UPDATE1: Correct me if I am wrong. I was thinking maybe using qt-gstreamer API might be the easiest way.

UPDATE2: I am able to make this work using the "fbdevsink" gstreamer plugin. Thanks to all for the pointers.

解决方案

This sounds very weird.

GTK+ relies on GDK for its drawing and input needs, and GDK uses different backends for different platforms and environments.

The X11 backend is one, but there are others.

You simply must make sure you build GDK with a suitable backend for your environment.

这篇关于为什么QT可以运行没有X服务器和GTK不能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆