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
Forum Updated to NodeBB v4.3 + New Features

QOpenglWidget - Complete Example

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.3k Views 2 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.
  • U Offline
    U Offline
    uauauaua
    wrote on 25 Apr 2015, 16:33 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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Apr 2015, 22:14 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 27 Apr 2015, 10:55
      0
      • S SGaist
        25 Apr 2015, 22:14

        Hi and welcome to devnet,

        Do you mean put a QOpenGLWidget in a QDialog ?

        U Offline
        U Offline
        uauauaua
        wrote on 27 Apr 2015, 10:55 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
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 27 Apr 2015, 22:05 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
          • S SGaist
            25 Apr 2015, 22:14

            Hi and welcome to devnet,

            Do you mean put a QOpenGLWidget in a QDialog ?

            U Offline
            U Offline
            uauauaua
            wrote on 29 Apr 2015, 15:48 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
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 29 Apr 2015, 22:21 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

              5/6

              29 Apr 2015, 15:48

              • Login

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