Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Images disappearing when using translucent OpenGL background
Qt 6.11 is out! See what's new in the release blog

Images disappearing when using translucent OpenGL background

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rkerstens
    wrote on last edited by
    #1

    Hi there,

    I'm working on a little project where I want to display some sort of slideshow on a translucent background. First it was a pain to find out how to get the background of the window translucent, but when I finally did, the images were disappearing as soon as they where opaque. I'm new to the whole Qt/QML thingy and am kinda stuck in solving this.

    When I set the opacity of the image to 1, it seems the image is put behind the other objects. When I change the opacity to let's say 0.999999 it appears correctly in the place where I expect it to be.

    I set the format using this code
    @viewer.setSurfaceType(QSurface::OpenGLSurface);

    QSurfaceFormat format;
    format.setAlphaBufferSize(8);
    format.setRenderableType(QSurfaceFormat::OpenGLES);

    viewer.setFormat(format);
    viewer.setColor("transparent");
    viewer.setClearBeforeRendering(true);@

    Does anyone else recognize this problem, and possibly have a solution? :-)

    Thanks, Rogier

    1 Reply Last reply
    0
    • C Offline
      C Offline
      chrisadams
      wrote on last edited by
      #2

      Hi,

      I can't remember the bug number now, but ISTR Gunnar mentioning something about this in a bug report. Ask him on #qt-graphics and I'm sure he'll be able to point you to the bug.

      Cheers,
      Chris.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved