Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGLWidget/QOpenGLWidget with transparent background

QGLWidget/QOpenGLWidget with transparent background

Scheduled Pinned Locked Moved General and Desktop
backgroundopengltransparenttranslucenttransparencyalphaqopenglwidgetoverlaysee throughtqglwidget
1 Posts 1 Posters 2.0k Views
  • 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.
  • F Offline
    F Offline
    FredeHo
    wrote on 27 Sept 2015, 17:37 last edited by
    #1

    Hi guys,
    im trying to get the background of a QGLWidget transparent so I can e.g. draw some Quads, but the background/clearcolor is transparent so one can see the widgets underneath.
    This is what ive been trying so far:
    1.
    setWindowFlags(Qt::FramelessWindowHint);
    setAttribute(Qt::WA_TranslucentBackground, true);
    (on the QGLWidget)

    switching to the new QOpenGLWidget with
    setWindowFlags(Qt::FramelessWindowHint);
    setAttribute(Qt::WA_AlwaysStackOnTop, true);

    But it doesnt seem to work at all.
    With QOpenGLWidget I can get a transparent background, but I can't see my opaque stuff as well.
    Does anyone have a Solution for that?

    I tried this on many different Systems: Win 7/8.1/10 with Qt5.2.1/5.4.2/5.5.0
    Best regards,
    Frede

    1 Reply Last reply
    0

    1/1

    27 Sept 2015, 17:37

    • Login

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