Mon, 09/21/2020 - 23:04
Forums:
I am attempting to create a Qt application in C++ which incorporates a 3D OCC visualization. I am new to OpenCascade and Qt and would like to put the visualization in a frame or widget, so that I can incorprate it into a layout. Does anyone know what I can do to get a simple 3D visualization to work inside of a QWidget/QFrame?
Thanks in advance.
Tue, 10/06/2020 - 16:48
Hello,
just take a look at the OCC Qt Samples, there is example there with QML and with QWidgets.
Best regards,
François.
Wed, 11/04/2020 - 16:28
you need to bind the winId of Qwidget to the v3d_view. The sample code is follow:
The windowID above is the id of the Qwidget which you want to bind.
At last you need to redraw the view in the paintEvent of Qwidget.
if you want to display the shape, you can use aContext->Display().