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. QOpenGLWidget not found in Qt version 6.3.0
Forum Updated to NodeBB v4.3 + New Features

QOpenGLWidget not found in Qt version 6.3.0

Scheduled Pinned Locked Moved Solved General and Desktop
17 Posts 7 Posters 9.3k Views 1 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.
  • JoeCFDJ JoeCFD

    Go check the include path in the make file. If the include path of module openglwidgets is not there, there must be a bug in the qt plugin for VS. You can add its include path in your VS project manually.

    M Offline
    M Offline
    makopo
    wrote on last edited by makopo
    #7

    @JoeCFD

    I had added the include path in the project settings like this: C:\Qt\6.3.0\msvc2019_64\include\QtOpenGLWidgets. And after that it works with #include <QOpenGLWidget>.

    The problem now is that I have to implement ALL protected functions of QOpenGLWidget, although I only need initializeGL(), paintGL() and resizeGL().

    But that is not the problem of this topic.

    JoeCFDJ 1 Reply Last reply
    0
    • M makopo

      @JoeCFD

      I had added the include path in the project settings like this: C:\Qt\6.3.0\msvc2019_64\include\QtOpenGLWidgets. And after that it works with #include <QOpenGLWidget>.

      The problem now is that I have to implement ALL protected functions of QOpenGLWidget, although I only need initializeGL(), paintGL() and resizeGL().

      But that is not the problem of this topic.

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #8

      @makopo check the definitions of these functions in QOpenGLWidget.h to see if they have = 0 at the end; if yes, you have to do it.

      M 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        @makopo check the definitions of these functions in QOpenGLWidget.h to see if they have = 0 at the end; if yes, you have to do it.

        M Offline
        M Offline
        makopo
        wrote on last edited by
        #9

        @JoeCFD

        I checked it. It is not necessary to implement all methods of this class.

        I'am not sure if this problem is a problem of the project setting, Qt VS Tools or version 6.3.0. Because I'am a beginner, I'am sitting the half day on this problem..

        JonBJ 1 Reply Last reply
        0
        • M makopo

          @JoeCFD

          I checked it. It is not necessary to implement all methods of this class.

          I'am not sure if this problem is a problem of the project setting, Qt VS Tools or version 6.3.0. Because I'am a beginner, I'am sitting the half day on this problem..

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #10

          @makopo
          You should not have to implement a method just because the base is protected. Perhaps show what error makes you say this?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            makopo
            wrote on last edited by makopo
            #11

            @JonB said in QOpenGLWidget not found in Qt version 6.3.0:

            You should not have to implement a method just because the base is protected

            I know that. My problem is that this is the opinon of Visual Studio (or IntelliSense). I get error with the error code E1696 and C1083.

            Let my explain what I had done:

            I had created a Qt project with the Qt Widgets Application template. I setup the include-directory and library-directory in the project settings. I also add the library to the linker.

            I add QT += core gui widgets opengl openglwidgets to the .pro/qmake file.

            With this setup I can include the modules QObject, QWidget, QDebug, QPainter, QOpenGLFunctions. When I include QOpenGLWidget IntelliSense show me the error that the module can not be found. So I include the whole module C:\Qt\6.3.0\msvc2019_64\include\QtOpenGLWidgets to my project settings. With this I get no error message from IntelliSense. But if I derive QOpenGLWidgets to implement the three protected functions of the class I get Linker errors according to the "reimplemented protected functions" and it looks like that the implementation is required.
            These errors look like:
            LNK2001 Nicht aufgelöstes externes Symbol ""protected: virtual bool __cdecl QOpenGLWidget::event(class QEvent *)" (?event@QOpenGLWidget@@MEAA_NPEAVQEvent@@@Z)"

            1 Reply Last reply
            0
            • M Offline
              M Offline
              makopo
              wrote on last edited by makopo
              #12

              I solved it.

              I checked the Qt project settings in Visual Studio and found that openglwidgets was not added to the QtModules section.
              Befor I realize that I added openglwidgets only to the qmake file.

              A communication problem between QtVSTools and the .pro file?

              JoeCFDJ S 2 Replies Last reply
              0
              • M makopo

                I solved it.

                I checked the Qt project settings in Visual Studio and found that openglwidgets was not added to the QtModules section.
                Befor I realize that I added openglwidgets only to the qmake file.

                A communication problem between QtVSTools and the .pro file?

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by
                #13

                @makopo Good for you. Now I remember there is a step to select modules in the plugin. Is this step really needed? not sure.

                1 Reply Last reply
                0
                • M makopo

                  I solved it.

                  I checked the Qt project settings in Visual Studio and found that openglwidgets was not added to the QtModules section.
                  Befor I realize that I added openglwidgets only to the qmake file.

                  A communication problem between QtVSTools and the .pro file?

                  S Offline
                  S Offline
                  SimonSchroeder
                  wrote on last edited by
                  #14

                  @makopo said in QOpenGLWidget not found in Qt version 6.3.0:

                  A communication problem between QtVSTools and the .pro file?

                  There is no communication between Visual Studio and the .pro file. If you change the .pro file you have to recreate the VS project file. (At least, this has always been my understanding and I started using qmake to create the VS project file, as the VS Qt plugin is (used to be???) terrible.)

                  M 1 Reply Last reply
                  0
                  • S SimonSchroeder

                    @makopo said in QOpenGLWidget not found in Qt version 6.3.0:

                    A communication problem between QtVSTools and the .pro file?

                    There is no communication between Visual Studio and the .pro file. If you change the .pro file you have to recreate the VS project file. (At least, this has always been my understanding and I started using qmake to create the VS project file, as the VS Qt plugin is (used to be???) terrible.)

                    M Offline
                    M Offline
                    makopo
                    wrote on last edited by makopo
                    #15

                    @SimonSchroeder

                    Many thanks for your advice! I got the same problems as descriped in my first post, after I had created a new class file in VS and include Qt Widget. After that I got errors in ALL my classes, that include Qt modules. I recreate the VS project and that helps to fix the issue.

                    I think your advice is the right way to troubleshoot this.

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      AnandRathi
                      wrote on last edited by AnandRathi
                      #16

                      In VC++ / Visual Studio C++
                      rihght Click Project - > Properties -> Qt Project settings -> QT Modules -> drop down select QT Modules and click Qt Opengl

                      J 1 Reply Last reply
                      0
                      • A AnandRathi

                        In VC++ / Visual Studio C++
                        rihght Click Project - > Properties -> Qt Project settings -> QT Modules -> drop down select QT Modules and click Qt Opengl

                        J Offline
                        J Offline
                        juejuezi
                        wrote on last edited by
                        #17

                        @AnandRathi best way

                        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