eryar / occQt

A simple OpenCASCADE Qt demo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about inherit an Open CASCADE View from a QGLWidget?

mahaidong opened this issue · comments

I read this from https://www.opencascade.com/content/open-cascade-view-qglwidget

OCC does the necessary OpenGL pixel formatting and initialization on the QWidget. On the QGLWidget, Qt already has done the formatting. Once you pass the window handle of the QGLWidget to OCC it will override QGLWidget's pixel settings and write its own. So, essentially, you won't be having any benefit of using the QGLWidget in place of QWidget.

is it possible inherit an occ view from QWidget?

When I do this I got a compile error :-1: error: symbol(s) not found for architecture x86_64 .
My computer is macbook

@mahaidong Yes, It is possible to inherit an occ view from QWidget, you can refer the occ Qt samples.

I checked it already.
if I add setAttribute(Qt::WA_PaintOnScreen); to qwidget , it works.

thanks