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

QQuickWidget::winId() breaks rendering

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.3.1, 5.4.0
    • Quick: Widget
    • None

      If winId() gets called at any point on a qquickwidget instance (or even on any of the ancestors of the qquickwidget), rendering will stop immediately, turning it to a black window.
      stderr starts to repeat over and over:
      QQuickWidget cannot be used as a native child widget. Consider setting Qt::AA_DontCreateNativeWidgetSiblings

      Given that error message, the problem seems that winId() turns it into a native window and calls QWidgetPrivate::createWinId, breaking the conditions QQuickWidget needs in order to be able to render correctly.
      Attached there i a simple patch to the qquickwidget example (5.4 branch) that shows the problem.

        1. break.diff
          0.6 kB
        2. testcase.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            lagocs Laszlo Agocs
            notmart Marco Martin
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes