This sample demonstrates how to use Open CASCADE Technology (OCCT) 3D Viewer within a window created using Qt5 on Windows and Linux platforms.
To support multitouch, combined with Qt's official "imagestures" project. https://doc.qt.io/qt-6/qtwidgets-gestures-imagegestures-example.html
Project within occt-qopenglwidget subfolder shows initialization of OCCT 3D viewer
from OpenGL context created by QOpenGLWidget within Qt5 Widgets application.
Project could be built in two ways:
- Using CMake.
See
CMakeLists.txtin the folder defining building rules. Usecmake-guior command-line interface for configuring project dependencies (Qt, OCCT). - Using qmake.
See
occt-qopenglwidget-sample.proin the folder defining building rules. Createcustom.prifromcustom.pri.templatewith filled in paths to OCCT.
Qt Creator could be used to open qmake project directly.
Make sure to copy necessary dependencies (OCCT, FreeType, FreeImage, etc. - depending on OCCT building configuration)
into sample folder or configuring environment (PATH, LD_LIBRARY_PATH).
Building has been checked within OCCT 7.6.0.

