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. QT GLWidget

QT GLWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 1.5k 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.
  • D Offline
    D Offline
    Daniel Acosta
    wrote on last edited by
    #1

    So, i made my code, but when i run the program the ui only shows a black GLWidget, what can i do to solve this? i'm using the newest version of QT

    JKSHJ 1 Reply Last reply
    0
    • D Daniel Acosta

      So, i made my code, but when i run the program the ui only shows a black GLWidget, what can i do to solve this? i'm using the newest version of QT

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @Daniel-Acosta said in QT GLWidget:

      So, i made my code, but when i run the program the ui only shows a black GLWidget, what can i do to solve this? i'm using the newest version of QT

      First, try switching to QOpenGLWidget instead. This fixes a number of problems with QGLWidget.

      Next, open the "Examples" section of Qt Creator and try to run the "OpenGL Window Example". Does that work?

      If the example works but your own app doesn't work, post some code.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      D 1 Reply Last reply
      1
      • JKSHJ JKSH

        @Daniel-Acosta said in QT GLWidget:

        So, i made my code, but when i run the program the ui only shows a black GLWidget, what can i do to solve this? i'm using the newest version of QT

        First, try switching to QOpenGLWidget instead. This fixes a number of problems with QGLWidget.

        Next, open the "Examples" section of Qt Creator and try to run the "OpenGL Window Example". Does that work?

        If the example works but your own app doesn't work, post some code.

        D Offline
        D Offline
        Daniel Acosta
        wrote on last edited by Daniel Acosta
        #3

        @JKSH first, thanks for the fast reply, the example works, the code i'm using is exactly the code on this page http://www.bogotobogo.com/Qt/Qt5_OpenGL_QGLWidget.php

        JKSHJ 1 Reply Last reply
        0
        • D Daniel Acosta

          @JKSH first, thanks for the fast reply, the example works, the code i'm using is exactly the code on this page http://www.bogotobogo.com/Qt/Qt5_OpenGL_QGLWidget.php

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @Daniel-Acosta said in QT GLWidget:

          the code i'm using is exactly the code on this page http://www.bogotobogo.com/Qt/Qt5_OpenGL_QGLWidget.php

          That example uses the old QGLWidget. As I said, you should use QOpenGLWidget instead.

          @JKSH first, thanks for the fast reply, the example works

          You're welcome.

          I'm glad to hear that the "OpenGL Window Example" works. Next, try the "Hello GL2 Example" from Qt Creator. If that works, that means there is nothing wrong with Qt or your system -- Just use different tutorials instead.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          D 1 Reply Last reply
          1
          • S Offline
            S Offline
            Saeed_Nowroozi
            wrote on last edited by
            #5

            I have this problem.I try run this code :http://www.bogotobogo.com/Qt/Qt5_OpenGL_QGLWidget.php
            but page is black.

            JKSHJ 1 Reply Last reply
            0
            • JKSHJ JKSH

              @Daniel-Acosta said in QT GLWidget:

              the code i'm using is exactly the code on this page http://www.bogotobogo.com/Qt/Qt5_OpenGL_QGLWidget.php

              That example uses the old QGLWidget. As I said, you should use QOpenGLWidget instead.

              @JKSH first, thanks for the fast reply, the example works

              You're welcome.

              I'm glad to hear that the "OpenGL Window Example" works. Next, try the "Hello GL2 Example" from Qt Creator. If that works, that means there is nothing wrong with Qt or your system -- Just use different tutorials instead.

              D Offline
              D Offline
              Daniel Acosta
              wrote on last edited by
              #6

              @JKSH Many thanks, i will check it out.

              1 Reply Last reply
              0
              • S Saeed_Nowroozi

                I have this problem.I try run this code :http://www.bogotobogo.com/Qt/Qt5_OpenGL_QGLWidget.php
                but page is black.

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #7

                @Saeed_Nowroozi said in QT GLWidget:

                I have this problem.I try run this code :http://www.bogotobogo.com/Qt/Qt5_OpenGL_QGLWidget.php
                but page is black.

                Read the other posts in this thread and follow their instructions.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                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