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. How can I set QOpenGLWidget to be transparent
Forum Updated to NodeBB v4.3 + New Features

How can I set QOpenGLWidget to be transparent

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 178 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.
  • A Offline
    A Offline
    Azmat
    wrote on last edited by
    #1

    Hello, everyone.I am trying to set the background of QOpenGLWidget to be transparent,but no solution(setPalette\setCompositionMode\setStyleSheet\setAttribute(Qt::WA_TranslucentBackground, true);) worked.Please give me some advise~

    1 Reply Last reply
    0
    • gde23G Offline
      gde23G Offline
      gde23
      wrote on last edited by
      #2

      OpenGL Widgets do not support transparency since they are rendered differently.
      However you can do some tricks by rendering the widget behind and then set it as background of your openGL scene.

      1 Reply Last reply
      1

      • Login

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