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. OpenGL using Qt 5.2.1
Forum Update on Monday, May 27th 2025

OpenGL using Qt 5.2.1

Scheduled Pinned Locked Moved Solved General and Desktop
opengl5.2.1
10 Posts 4 Posters 3.3k Views
  • 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
    Ailurus
    wrote on 7 Dec 2015, 14:49 last edited by
    #1

    Hi, I would like to use Qt for a course on OpenGL I'll be supervising early next year. The thing is, the version of Qt installed on the machines that we can use is 5.2.1. What would be the recommended workflow here, using a QWindow with QOpenGLContext? In 5.4+ I'd use a QOpenGLWindow or QOpenGLWidget.

    1 Reply Last reply
    1
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 7 Dec 2015, 18:25 last edited by
      #2

      Hi
      Updating to 5.4+ is not an option?
      Lesson 1:
      Using the qt maintenance tool. :)

      A 1 Reply Last reply 7 Dec 2015, 22:35
      0
      • M mrjj
        7 Dec 2015, 18:25

        Hi
        Updating to 5.4+ is not an option?
        Lesson 1:
        Using the qt maintenance tool. :)

        A Offline
        A Offline
        Ailurus
        wrote on 7 Dec 2015, 22:35 last edited by
        #3

        Well, I don't have the rights to update those machines (all running Ubuntu 14.04 LTS). It looks like I'll have to rely on using 5.2.1

        M 1 Reply Last reply 7 Dec 2015, 22:39
        1
        • A Ailurus
          7 Dec 2015, 22:35

          Well, I don't have the rights to update those machines (all running Ubuntu 14.04 LTS). It looks like I'll have to rely on using 5.2.1

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 7 Dec 2015, 22:39 last edited by
          #4

          @Ailurus said:
          ok. it's a shame as QOpenGLWindow is somewhat more modern or
          at least it felt so.
          How many machines are there?
          Huge work I assume and the admins will run away screaming if you ask
          for upgrade?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 7 Dec 2015, 22:40 last edited by
            #5

            Hi,

            One alternative that you can propose to your IT service is use the online installer, no need for root rights to use that version of Qt and you'll have a modern setup to teach OpenGL.

            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
            1
            • A Offline
              A Offline
              Ailurus
              wrote on 7 Dec 2015, 22:50 last edited by Ailurus 12 Jul 2015, 22:52
              #6

              Thanks both. There are 20-30 computers. Requesting updates that require packages from the standard Ubuntu 14.04 repositories is usually not a problem. It gets a bit trickier when a manual approach has to be used though :).

              Judging by your replies there doesn't seem to be a straightforward approach to use OpenGL with Qt 5.2.1 (without falling back on QGL* libraries)?

              M 1 Reply Last reply 7 Dec 2015, 22:56
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 7 Dec 2015, 22:54 last edited by
                #7

                OpenGL and Qt dates back way before Qt 5. It's just that "modern OpenGL" is a bit more recent and Qt 5.2.1 doesn't have yet everything it has now.

                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 Ailurus
                  7 Dec 2015, 22:50

                  Thanks both. There are 20-30 computers. Requesting updates that require packages from the standard Ubuntu 14.04 repositories is usually not a problem. It gets a bit trickier when a manual approach has to be used though :).

                  Judging by your replies there doesn't seem to be a straightforward approach to use OpenGL with Qt 5.2.1 (without falling back on QGL* libraries)?

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 7 Dec 2015, 22:56 last edited by
                  #8

                  hi
                  You could read these 5 articles
                  http://www.kdab.com/opengl-in-qt-5-1-part-1/
                  They give good info on what is available in my opinion.

                  1 Reply Last reply
                  1
                  • A Offline
                    A Offline
                    Ailurus
                    wrote on 7 Dec 2015, 23:28 last edited by
                    #9

                    Very nice example using the various shader stages! However, it seems to come down to either using something like QGLWidget or updating to 5.4+. Correct?

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      Chris Kawa
                      Lifetime Qt Champion
                      wrote on 8 Dec 2015, 01:08 last edited by
                      #10

                      Although QOpenGLWindow and QOpenGLWidget are nice Qt5.4 convenience classes, you can still use a vanilla QWindow to render OpenGL. It is available starting with Qt5.0.
                      It's a little more code to start but after that it's straightforward. The OpenGL Window Example shows how to use it.

                      Still, updating to more recent Qt version is a preferred thing to do. There's no reason to teach people things that are outdated from the get go. The unnecessary boilerplate code will obscure the topic.

                      1 Reply Last reply
                      1

                      1/10

                      7 Dec 2015, 14:49

                      • Login

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