Hi Gunnar, Thanks for your reply. I had a few more queries about what you suggested in the last email.
After studying the QtJambiAWTbridge, I understood that QComponentHost.java is acting as a parent to AWT widgets and is utilizing RedirectContainer.java to get the embedded AWT component and for performing focus management. As far as parenting a window is concerned, the code is using WEmbeddedFrame.java and passing a QWinID to WEmbeddedFrame. I am not sure why you suggested I will need to use Win32 API (Windows)/XEmbed(Unix) in order to re-parent AWT widgets to QWidget(C++). Can I not use winID of a QWidget and pass it to WEmbeddedFrame? I'm definitely missing something here. It would be great if you could please elaborate on the steps required to reparent AWT widgets. Thanks again, Ruchika -----Original Message----- From: Gunnar Sletta [mailto:[email protected]] Sent: Friday, October 09, 2009 3:22 AM To: Ruchika Marda Cc: Lista-qt-jambi Subject: Re: [Qt-jambi-interest] Blog about porting Qt 4.6 to Java Ruchika Marda wrote: > Great article. Thanks Eskil!! > > I've been reading about QtJambiAWTBridge lately which allows > embedding AWT/Swing components into an existing Qt (Jambi) component. > > With regard to the same, is it possible to embed an AWT/Swing > component into a Qt (C++)component without using Jambi. This is > important because: Yes, this should be possible... Take the code that makes up the AWT bridge and rewrite the very few pieces in it that are Qt Jambi dependent. The primary thing is reparenting the "heavy weight" AWT using its native window id to a QWidget which has an explicit window id (sub-widgets don't by default). This can be done using win32 API under windows and XEmbed on X11. Once you get that running its whole lot of hazzle getting focus to work, but the code is in the AWT bridge, so its just a matter of re-working it to your needs. - Gunnar _______________________________________________ Qt-jambi-interest mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
