I am designing a PyQt based application which has some components which do some heavy lifting in the GUI thread (live plotting some relatively large data-sets).
My experience is that other parts of my GUI can get somewhat unresponsive while this is happening - also I want to run multiple threads and avoid running into the old GIL problem.
To work around both of these issues, I want to run various parts of my application as separate processes (either using multiprocessing module or launching parallel python instances which communicate over sockets).
I am wondering if there is any way I can get the windows from the other processes to dock in my main window.
Minimal example by request:
sub_proc_a.py
from PyQt5 import QtWidgets
app = QtWidgets.QApplication([])
sub_process_window = QtWidgets.QWidget()
sub_process_window.setWindowTitle("Dock Me!")
sub_process_window.show()
app.exec_()
master_proc.py
from PyQt5 import QtWidgets
from subprocess import Popen
app = QtWidgets.QApplication([])
main_window = QtWidgets.QMainWindow()
main_window.setWindowTitle("Main window")
main_window.show()
sub_proc_a = Popen("python sub_proc_a.py")
# HOW DO I GET HANDLES TO THE WINDOWS OPENED by sub_proc_a such that I can dock them?
app.exec_()