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. Converting QWidget to QGLWidget in Qt Creator

Converting QWidget to QGLWidget in Qt Creator

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 5.2k 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.
  • Z Offline
    Z Offline
    Zamaster
    wrote on last edited by
    #1

    (see title) I'm a newcomer to Qt and have read some tutorials online about using OpenGL with Qt. I found one that I cannot seem to find that renders to an openGl framebuffer that is then rendered to (what starts as) a QWidget. There was some step in making the QWidget a QGLWidget but I remember that it used the GUI designer to get the layout right etc... How does one go about doing this? Thanks!

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      I think you want the promotion feature in Designer:
      http://qt-project.org/doc/qt-5/designer-using-custom-widgets.html

      • Drop a QWidget on your form
      • Right click it and select "Promote to..."
        ** Base class name : QWidget
        ** Promoted class name: QGLWidget
        ** Header file: QGLWidget
        ** Global include: checked
      • Click Add then Promote
      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        Zamaster
        wrote on last edited by
        #3

        Yes! This was it, thanks a lot!

        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