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

reparenting a QWindow via [win32] SetParent does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.6.0 RC
    • QPA: Windows
    • None

    Description

      in my project, I have the following setup:

      I create a QOpenGLWindow, which at some point, I have to re-parent to some native WIN32 window. After doing that, my QOpenGL window does not receive any paintGL() calls anymore (it seems its exposed flag is set to false).

      I created a minimal repro (attached), which does the following:

      it's a standard Qt application, which creates and opens a simple (toplevel) QOpenGL window. When pressing the "Re-Parent" button, it will create a simple QWindow, to which the existing QOpenGLWindow should be re-parented. When trying to do this with native win32 SetParent() - which is what I have to do in the end - all paintGL() calls are gone. When trying it with QWindow::setParent(), the app will crash straight away.

      This seems to be Windows only - a similar approach on MacOS works.

      Attachments

        1. qtbug51729.zip
          5 kB
          Friedemann Kleint
        2. ReparentTest.rar
          4 kB
          Wolfgang Schneider
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            woolfman007 Wolfgang Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes