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. Minimal [QGLWidget + ui] code
Qt 6.11 is out! See what's new in the release blog

Minimal [QGLWidget + ui] code

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 941 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.
  • Arty.McLabinA Offline
    Arty.McLabinA Offline
    Arty.McLabin
    wrote on last edited by
    #1

    Hello Fellas, i started learning OpenGL2 recently and trying to understand how to implement it inside a Qt project, i know there are many tutorials and examples out there, but i didn't manage to find the minimal requirments (some kind of a "(0,0) dot" for an opengl in Qt) including both QWidget and QGLWdget (inside the previous).

    i ask for the shortest example for a code to implement that QGLWidget (empty, no need for geometry) to fit inside a .ui form, for Qt5. The simpler the better to understand. thanks in advance and cheers.

    (Linux btw)

    Static linking is cool. Really.

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      I recommend using "QOpenGLWidget":http://doc.qt.io/qt-5/qopenglwidget.html from Qt 5.4. QGLWidget is now deprecated.

      See the "beginners' tutorial":http://doc.qt.io/qt-5/gettingstartedqt.html for creating a widget project. Jump down to "Using Qt Designer", and replace the "Text Edit" with "OpenGL Widget".

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

      1 Reply Last reply
      1

      • Login

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