Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Loading 3ds model with Assimp inside Qt widget
Qt 6.11 is out! See what's new in the release blog

Loading 3ds model with Assimp inside Qt widget

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 2.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    avmg
    wrote on last edited by avmg
    #1

    Hi everybody,

    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):
    http://www.bogotobogo.com/Qt/Qt5_OpenGL_QGLWidget.php

    ...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!

    J 1 Reply Last reply
    0
    • A avmg

      Hi everybody,

      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):
      http://www.bogotobogo.com/Qt/Qt5_OpenGL_QGLWidget.php

      ...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!

      J Offline
      J Offline
      jalomic
      wrote on last edited by
      #2

      @avmg Use Qt 3d
      http://qt-project.org/wiki/Loading-a-3D-Model

      A 1 Reply Last reply
      0
      • J jalomic

        @avmg Use Qt 3d
        http://qt-project.org/wiki/Loading-a-3D-Model

        A Offline
        A Offline
        avmg
        wrote on last edited by
        #3

        @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.

        Thanks.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          IIRC, that's because QGLView takes a QWindow as a parent not a QWidget

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • C Offline
            C Offline
            ceora
            wrote on last edited by
            #5

            If i'm not wrong Qt3D use assimp as loader...

            1 Reply Last reply
            0
            • A Offline
              A Offline
              avmg
              wrote on last edited by avmg
              #6

              Hi again,

              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'
              ...

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Are you sure you are linking to the needed module ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  avmg
                  wrote on last edited by
                  #8

                  I'm just trying to execute the "loadmodel" qt3d example, I only changed QWidget by QWindow and choose the correct includepaths.

                  Should work, no?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    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.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved