I currently have two files, one using PyQt5 to create a simple GUI layout of data pulled from a JSON file, and another file using vispy to open a simulation. How can I get the GUI to overlay the simulation?
I currently have tried importing the GUI into the simulation file and initializing and running it there, however, that did not work. I also tried creating an instance of the simulation inside of the GUI file and that did not work either.
You need to embed your vispy canvas into your pyqt5 gui. Creating an instance of the simulation inside the gui file won't work without subsequently adding the canvas wrapper to the main layout/frame/widget. Running the gui from the simulation file won't work. You need to specify pyqt5 as the backend:
app = use_app("pyqt5")Here is a bare-bones example:which will run: