0

In a 3D CAD program a friend and I are doing, the adding of a QWebEngineView is slowing down a QGraphicsScene.

We create a 3D model layer by layer, we place points in each layer in 2D (the points are painted by the QGraphicsScene), and then, using a QWebEngineView, we display the model in 3D using WebGL (so basically, we transform the 2D points in 3D spheres).

Before creating the QWebEngineView, we can smoothly move a set of points aroud the screen in the QGraphicsScene, but after the creation, it slows down and is not smooth anymore (2 to 3 times slower).

First we thought it was coming from webGL, we switched the URL of the page to Google. It is as slow as before.

Then, we tried to delete the QWebEngineView before going back to the QGraphicsScene and move points again. It is as slow as before, even if the QGraphicsScene does not exist anymore.

The question is, if the QWebEngingeView is destroyed, why is the QGraphicsScene not going as fast as before creating the QWebEngineView ? Do you know how to have both running smoothly ? Or a least get the QGraphicsScene as fast as before creating the QWebEngineView ?

Note : We code on Linux Mint, C++, Qt 5.6

shao.lo
  • 4,387
  • 2
  • 33
  • 47
ElevenJune
  • 423
  • 1
  • 4
  • 21
  • It would be a 100x easier to just show it all using a `QOpenGLWidget` to begin with... The `QWebEngineView` may be gone, but obviously the instance of the browser is still running and somehow slowing things down. My best advice is not to use it unless you absolutely need to. – Kuba hasn't forgotten Monica Aug 25 '16 at 21:05
  • We chose to use QWebEngineView because we prefered webGL over openGL. It was easier for us to integrate it, to program it, and we think it would be nice to give the possibility to look at your 3D model wherever you want just by opening the model in a web browser. But what would it take to go from webGL to OpenGL ? We see openGL as more low-level and harder than webGL. – ElevenJune Aug 26 '16 at 10:00
  • 1
    I don't see how webGL is any simpler. The differences are superficial - see https://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences – Kuba hasn't forgotten Monica Aug 26 '16 at 12:59
  • Okay, I may have seen openGL as too difficult, I will give it a small try. Thanks – ElevenJune Aug 26 '16 at 14:12

0 Answers0