Hi,

I have embedded a Python interpreter in my Qt5.12.0 App. The interpreter is python 3.6, running on Ubuntu 18.04. Everything works as expected.
But now I want to show a widget from a python script inside my application, with PySide2.


Qt Code:
  1. import sys
  2. from PySide2.QtWidgets import QApplication, QLabel
  3.  
  4. app = QApplication(sys.argv)
  5. label = QLabel("<font color=red size=40>Hello World!</font>")
  6. label.show()
  7. app.exec_()
To copy to clipboard, switch view to plain text mode 

This works fine as a standalone PySide2 Qt application. But obviously I cant create another QApplication in my embedded interpreter, because my regular C++ application already does that.
However, just doing

Qt Code:
  1. label = QLabel("<font color=red size=40>Hello World!</font>")
  2. label.show()
To copy to clipboard, switch view to plain text mode 

doesnt work, which doesnt really surprise me.



Question: How can I make this work?


(Final goal would be to create a docking widget from python, so I would have to make it a child of my QMainWindow, or expose a C++ baseclass to derive from. But that's the next step I guess...)