Using Panda3d with PyQt or PyGtk - Possible?


Is it possible to use a Panda3d viewport as a “widget” on a Qt/Gtk form?

I would like to build an app that can have multiple cameras for multiple windows, and each window would have buttons+widgets around the 3d viewing area. Would this conflict with keyboard/mouse input?

Whether this is possible and a few pointers on how to get going would be kindly appreciated.

aidave :slight_smile:

Certainly. There are lots of resources on the forums about adding a Panda viewport on a GTK/Qt/Wx/etc widget.
Basically it comes down to: (1) create a widget (2) get the window handle of it (3) create a panda window, with setParentWindow(da_window_handle) supplied in the WindowProperties.

I recommend searching the forums, you’ll surely find sample code.

Thank you very much pro-rsoft.

I have a feeling I will need to quiz your very large brain in the future. 8)

Well, I have something going now!

I can successfully press a button and bring up new Panda windows that are placed into dynamically loaded PyQt forms. You can see the code here if interested:

Some problems:

  • Cant seem to make the panda animation run (
  • Cant make second/third/etc windows resize properly, changes aspect ratio (
  • Cant get any mouse input in any windows (

Is there any chance someone could take a quick look at this?
If not thats ok. I have even more questions…!