Multiple windows, again

Hello there!

Yes, I know there was a lot of threads considering multiple windows, but the problem with Panda integration into GUI toolkits is obviously still present, so I have decided to ask maybe someone have any ideas how to solve my particular case.

I am trying to make Panda render into QWidget(PySide), as far as I understand it is not possible, because QWidget is not top-level window and doesn’t have real window id(in my case it is X window id), so I have tried various tricks with flags - QtCore.Qt.WA_PaintOnScreen for window and QtCore.Qt.AA_NativeWindows for application. WA_PaintOnScreen is used by QGLWidget in order to successfully create GL context for a window and I think it gives QWidget real winId. But Panda still doesn’t want to create render window.

It is possible to create GraphicsWindow with QMainWindow winId. But there is another problem, it seems Panda steals events from QWidgets. For example QMainWindow recevices mouse clicks, but QWidget to which Panda renders do not receive mouse clicks, as well as focusIn. That puzzles me a lot, because Panda doesn’t have ids for these widgets. I hoped to use some of these events to track active window and switch input from one to another via ShowBase.setupMouse. Because if I use setupMouse without multiWin support old window looses input forever, if I setup with multiWin then all windows receives input, but as I can’t figure out which window has focus this setup is not usable. Panda also seems to be ignorant about current focus, I think because I pass main window id and not real widget’s id where Panda renders.

Looks quite desperate… Any ideas? Thanks!