Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-113117

Failed to place widget over widget container containing QOpenGLWindow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 6.2.0
    • GUI: OpenGL
    • None
    • Windows

    Description

      You can download an example here: https://forum.qt.io/post/753086

       

      I created a window that inherited from QOpenGLWindow:

      ```
      class OpenGLWindow : public QOpenGLWindow, private QOpenGLFunctions
      ```

      I'm trying to place a button over a container that contains a QOpenGLWindow:

      ```

              QVBoxLayout *rootLayout = new QVBoxLayout();
              setLayout(rootLayout);

              m_pOpenGLWindow = new OpenGLWindow();
              QWidget *container = QWidget::createWindowContainer(m_pOpenGLWindow, this);
              rootLayout->addWidget(container);

              m_pStartGameButton = new QPushButton(QString("Start Game"), this);
              // m_pStartGameButton->raise();
              m_pStartGameButton->move(0, 0);
              m_pStartGameButton->setWindowFlags(m_pStartGameButton->windowFlags() | Qt::WindowStaysOnTopHint);

      ```

      But the button is behind the container.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            8observer8 Ivan Enzhaev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes