Im using Pyqt4, and I was wondering if it was possible to integrate a Pygame window to a PQT window. Ive been searching the net, and I can only find integration for wxPython, or tkinter.
Something like this:
Im suing Pygame 3 and Python 3.
Thanks in advance!
The page http://pygame.org/wiki/gui this is difficult and if you can, will have severe limitations. That said, I haven't seen how wx and tkinter do it.
But one approach I have seen before is to create two separate applications that communicate (via pipes, UDP, shared memory, XML-RPC, etc), then the "master", probably the Qt GUI, would size and position the slave (pygame app) so it looks like they are integrated. You would make the pygame app borderless. If your qt app is not full screen, and user moves window, you could send command to pygame to hide itself (or minimize or such) when move starts, then once user drops qt app in desired place, update pygame app position.
Python's multiprocessing module should make the IPC straightforward, appear seamless. And this way the two event loops (qt and game) don't interfere, no issues with threading.