I am trying to integrate Mayavi with qframe in pyqt6 application, but not able to. Anyone with a simple example code that can do that will be appreciated. Thanks
import mayavi
import PyQt6
class MainWindow(PyQt6.QtWidgets.QWidget):
def __init__(self):
super().__init__()
self.mayavi_scene = mayavi.mlab.new_scene()
# Add the Mayavi scene to the PyQt6 window.
self.mayavi_widget = mayavi.mlab.embed_in_qt5(self.mayavi_scene, parent=self)
# Display the PyQt6 window.
self.show()
if __name__ == "__main__":
import sys
app = PyQt6.QtWidgets.QApplication(sys.argv)
window = MainWindow()
sys.exit(app.exec_())