right here is the issue, softimage provides this handle only in cpp...
since its a void pointer i believe they chose not make it available for
python or other scripting languages.

in both blur's implementation and the implementation jo and i made we use
the member function of a Desktop class, GetApplicationWindowHandle(). on
windows the compiled plugin is actually quite simple (there is some non
functional stuff in it that needs to be removed) it creates the
QApplication in cpp then an 'anchor widget' and sets the widget's parent to
the return of the GetApplicationWindowHandle().

https://github.com/caron/PyQtForSoftimage/blob/master/src/QtSoftimage/qtsoftimage.cpp#L96-L100

if you look here, i think we need to make some platform specific #ifdefs
and platform specific function calls to reparent the QApplication to the
return of GetApplicationWindowHandle(). the python code provides the means
to forward the keystrokes to the necessary QWidget. i believe you will need
this once the QWidget is reparented and run in a non modal way, because
otherwise softimage is going to want to take those keystrokes.

as i mentioned to michal i did some reasearch for the corresponding xlib
functions to do the same...

http://tronche.com/gui/x/xlib/window-and-session-manager/XReparentWindow.html

i also found these discussions...

http://lists.trolltech.com/qt-interest/2000-07/thread00492-0.html
http://www.qtforum.org/article/27551/native-x-application-qt-widget-integration.html

do you have experience with this xlib/x server api?


On Fri, Jan 18, 2013 at 4:35 PM, ran sariel <ran.sar...@gmail.com> wrote:

> but I couldn't find a way to get soft to return the top window handle from
> python, did anyone else manage to do it without resorting to compiled
> plugin?

Reply via email to