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

Support a mode for stacking renderToTexture widgets on top

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.4.0
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Technical Risk:
      Normal
    • Commits:
      e453484bca5add5973602044ff0fbc224f819a07

      Description

      Right now QQuickWidget and QOpenGLWidget cannot be transparent since the textures for these widgets are always drawn first. The textured quad containing the rest of the backingstore (the normal widgets) comes last, with blending enabled, with a transparent "hole" punched into it for the special widgets.

      This is fine for allowing arbitrary stacking orders, as long as transparency for the texture-based widgets is not needed.

      If there is a sufficient demand for having (semi-)transparent QOpenGLWidget and QQuickWidgets on top of other widgets, it could be supported by some opt-in mechanism. In this mode, the "hole punching" in QWidgetPrivate::drawWidget would be skipped and QPlatformBackingStore::composeAndFlush would blit the textures belonging to such widgets after, not before, the backing store's texture, with blending enabled.

      This of course breaks other kinds of stacking (normal widgets on top of texture widgets for example) so it must remain a special, opt-in mode on a per-widget basis (Qt::WA_AlwaysStackOnTop for example).

        Attachments

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

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            lagocs Laszlo Agocs
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes