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 - Complete Example
QtWS25 Last Chance

QOpenglWidget - Complete Example

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

    Hi Guys,

    i am working new with QT 5.4 and OpenGL. I want to setup a Dialog from MainWindow and use an widget for OpenGL drawings.

    Has some one an Idea how it has to be done??

    Thank for your Support.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Do you mean put a QOpenGLWidget in a QDialog ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      U 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Do you mean put a QOpenGLWidget in a QDialog ?

        U Offline
        U Offline
        uauauaua
        wrote on last edited by
        #3

        @SGaist . Thank you,
        Yes you are thinking right. I want to integrate an OPENGL-Widget into a Dialog.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          As silly as it may sound, just use the usual technique, put it in a layout in your QDialog like you would for e.g. a QLineEdit

          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
          • SGaistS SGaist

            Hi and welcome to devnet,

            Do you mean put a QOpenGLWidget in a QDialog ?

            U Offline
            U Offline
            uauauaua
            wrote on last edited by
            #5

            @SGaist yes it sounds very simple but i haven't find the right starting Point.

            I want to create a OpenGL-class/Dialog for giving out 3d geometies.

            Thanks

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              The dialog itself boils down to:

              MyDialog::MyDialog(QWidget *parent):
                  :QDialog(parent)
                  ,myGLWidget(new MyGLWidget)
              {
                  QVBoxLayout *layout = new QVBoxLyout(this);
                  layout->add(myGLWidget);
              }
              

              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

              • Login

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