From: "richard.j.dale@..." Date: 2007-01-16T19:25:06+09:00 Subject: Re: Qtruby - calling a C application Vincent Fourmond wrote: > Fredrik J wrote: > > Hello all! > > Here is a question for all you Qtruby experts: > > > > I am writing a GUI with Qtruby, which is working great. I am also using > > some software written in C (RTP, http://web.cecs.pdx.edu/~watt/rtp/) > > that is plotting data in Qt. Now - I would like to tell this C > > application to use the main window that I have created in my Ruby code > > instead of creating its own main window. But how on earth do I pass > > this reference to my application written in C? I am guessing it is just > > some index number telling which window it is (?) > > If I understand you right, you're running an external application and > you would like your qtruby application to 'swallow' it ? (I use swallow, > like in FvwmButton which is doing something of the like). > > Look at the QX11Embed documentation, you should find what you need. > (it seems to me it's only Qt4, but I can't say for sure). Yes, you're right it is in Qt4, and it does sound possible to do what Fredrik wants with the QX11Embed classes. Those classes aren't included in the generation of the Smoke library that the current release of Qt4 QtRuby uses. I've now added the header QtGui/qx11embed_x11.h to the smoke/qt/header_list file so the QX11EmbedContainer and QX11EmbedWidget classes, and so they will be in the next release.