How to create python qwidget for c++ MainWindow?

I have a MainWindow written by c++, now I want to create a python qwidget that could also be part of the MainWindow design.
Because further development of my c++ qt application requires modules that python has ready in hand.
Since I am putting each component as a qwidget, I am wandering if Pyside2/6 or some other way allows me to write a complete python coded qwidget that can be part of my c++ QMainWindow.

not really get it… you want re-write C++ app into Python?

further development of my c++ qt application requires modules that python has ready in hand.
Since I am putting each component as a qwidget, I am wandering if Pyside2/6 or someway allows me to write a complete python coded qwidget that can be part of my c++ QMainWindow.

As far I know you cannot reuse Python code in C++ with ease, but even if this is possible probably you get huge speed penalty.