Loading 3ds model with Assimp inside Qt widget
I'm struggleling trying to run a 3D model previously loaded with Assimp (.3ds format) inside a Qt form. Does anybody try it?
My starting points were these 2 tutorials:
Qt5 Tutorial OpenGL with QGLWidget - 2015 (basically creates a glwidget drawing a piramid and puts inside a Qt form):
...and the SimpleOpenGL sample that comes with assimp-3.1.1, (loads the .3ds model).
My target is to draw the 3ds model instead the piramid inside the Qt form.
Thanks for helping!
@jalomic I would like but the next release is scheduled for the next 5th of May. I try to build the actual branch, but i think i did something wrong because when i try to execute that example i get this error:
error: no matching function for call to 'QGLView::QGLView(QWidget*&)'
That's why i decide to use assimp.
IIRC, that's because QGLView takes a QWindow as a parent not a QWidget
If i'm not wrong Qt3D use assimp as loader...
I tried to change GLView::GLView(QWidget *parent) by GLView::GLView(QWindow *parent) but i still get theses errors:
error: undefined reference to `QGLView::QGLView(QWindow*)'
error: undefined reference to `QGLView::camera() const'
Are you sure you are linking to the needed module ?
I'm just trying to execute the "loadmodel" qt3d example, I only changed QWidget by QWindow and choose the correct includepaths.
Should work, no?
You can't exchange QWindow and QWidget like that, they are not the same thing. You would need to create a QWindow from your QWidget first.