With mplayer it is fairly easy. Use a -wid parameter with mplayer and as an argument specify window id (returned by QWidget::winId()) of the widget you want to embed the player in.
With mplayer it is fairly easy. Use a -wid parameter with mplayer and as an argument specify window id (returned by QWidget::winId()) of the widget you want to embed the player in.
AlexKiriukha (10th April 2006)
what incase of a generic application? eg java applet or something of that sort?
This comes down to the Xlib layer then, I guess. There is a Qt Solution which does that.Originally Posted by nupul
nupul (10th April 2006)
well i don't think it needs to come down to the Xlib layer...The Qt4 Doc cites QX11EmbedContainer and QX11EmbedWidget to achieve the same....
Honestly, i didn't know about this class till this thread
I went to the link you gave and had a look through the docs for the same...
Thanks
Nupul.
Doesn't it only allow embedding applications which allow that by allowing to specify a window ID to open into?
yes.Originally Posted by wysota
well i didn't clarify....what i meant was any application that ran in some window i.e. a gui based app.
nupul
No, that's the problem. Not any app, just the ones which use XEmbed (which is of course in XLib layer).Originally Posted by nupul
any way to perform such an embedding under window$ ???
Qt is cross-platform isn't it?![]()
Current Qt projects : QCodeEdit, RotiDeCode
Let me open up this thread again, because I am having a problem with it. I can get MPlayer embedded using its -wid parameter. But I am unable to embed any window by passing the WindowID to QX11EmbedContainer::embedClient. The old Qt3 solution sample code doesn't work (after porting to qt4 of course), and neither does the QDevBlog sample for XEmbed here <http://blogs.qtdeveloper.net/archives/2005/08/10/playing-around-with-xembed/>. This is very frustrating because I know it works in Qt3, and worked long enough in Qt4 for the QDevBlog to get a screenshot of it.
I have logged this as a bug with Trolltech, but I am wondering if anyone else has seen this, and whether it's a new bug. Please use the QDevBlog sample code for discussion.
Thanks...
The QDevBlog example worked for me (SUSE 10, Qt 4.1.4) embedding Konquerer. I used xwininfo to find the window id.
Doing a bit of playing around, I see that it works under 4.1.4, but not under 4.2.0-rc1. After logging four bugs in one day, I'm starting to think the "release candidate" is the wrong term to use...
Sorry for reopening... but I find this to be a good question. How does one do this under Windows? I assume QX11EmbedWidget will obviously only work under X11.
And one more question since I have not used QX11Embed*, can I use these classes to essentially attach my Qt app to another window... to basically doc mine to the side for example?
I am just hanging to this thread, because I also have a problem with this. I am trying to embed xterm in a QDockWidget. All that I need is the wid. When passing the wid to embedClient(..) manually (via xwininfo -int) it works perfectly, but I don't see any good way of getting that wid? Ideas?
Thank you guys for your replies.Originally Posted by wysota
So basically what u mean is that just passing the windId to the mplayer -wid parameter will embed mplayer to the widget which i got the windId. sounds pretty much easy.
I knew about QX11EmbedContainer and had a look before but i got a bit confused, thats why i posted here, i guess i am just a newbie
I ll try this thing out.
thanks again
I Think therefore I Code...
Bookmarks