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

Calling winId() on a child widget results on black squares and flickering on native OpenGL and non-native childs

    XMLWordPrintable

Details

    Description

      Using Qt.5.7.1 when a call is made to winId() from a QFrame or a QMacCocoaViewContainer that acts as a child window/container for a non-native window display (for VLC media player output in my case) the container shows black squared content only and or flickers as soon as another widget receives an (focus/update/resize etc etc) event .

      The bug can be reproduced easily using the example from (drgvond) Gabriel de Dietrich (see his attached window.patch) to show the existance of this bug as shown in QTBUG-51793.

      The bug affects all WebEngineViews as well as all non-native outputs (to a QFrame or QMacCocoaViewContainer all in the same Qt application inside the same QMainWindow.

      This bug appears to be solved since Qt 5.6.0 but is definitely back in Qt 5.7.1 for Mac OS X when using the example from Dietrich.

      My own experience is that everything (QWebengineView and QMacCocoaViewContainer) works fine when winId() call is not used OR when there is no OpenGL widget inside the QMainWindow. It is the combination that does not work.

      Note:
      Setting export QT_MAC_WANTS_LAYER=1 solves the issue for a few seconds BUT leads to a crash at the end (when an event change occurs).

      Attachments

        Issue Links

          Activity

            People

              sletta Gunnar Sletta
              thefactory Rembrand
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: