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. Transparent Window with Qt Widgets
Forum Updated to NodeBB v4.3 + New Features

Transparent Window with Qt Widgets

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 615 Views 2 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.
  • Ronel_qtmasterR Offline
    Ronel_qtmasterR Offline
    Ronel_qtmaster
    wrote on last edited by
    #1

    Hello. I have found a way to make a transparent window with Qt.I mean with transparent background.From the window you can see background elements but not click on them.
    tw.PNG

    It can help those interested in designing windows with Qt

    if you want to contribute, check
    https://github.com/jordanprog86/QtTransparentWindow.git

    Pl45m4P 1 Reply Last reply
    0
    • Ronel_qtmasterR Ronel_qtmaster

      Hello. I have found a way to make a transparent window with Qt.I mean with transparent background.From the window you can see background elements but not click on them.
      tw.PNG

      It can help those interested in designing windows with Qt

      if you want to contribute, check
      https://github.com/jordanprog86/QtTransparentWindow.git

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Ronel_qtmaster said in Transparent Window with Qt Widgets:

      I have found a way to make a transparent window with Qt

      I mean... using

      setAttribute(Qt::WA_TranslucentBackground);
      setWindowFlags(Qt::FramelessWindowHint);
      

      is not a groundbreaking discovery :)

      From the window you can see background elements but not click on them

      Yes, because the QWindow/QWidget is still there, even when it's transparent and you can see through. It's still the top-level window.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      Ronel_qtmasterR 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @Ronel_qtmaster said in Transparent Window with Qt Widgets:

        I have found a way to make a transparent window with Qt

        I mean... using

        setAttribute(Qt::WA_TranslucentBackground);
        setWindowFlags(Qt::FramelessWindowHint);
        

        is not a groundbreaking discovery :)

        From the window you can see background elements but not click on them

        Yes, because the QWindow/QWidget is still there, even when it's transparent and you can see through. It's still the top-level window.

        Ronel_qtmasterR Offline
        Ronel_qtmasterR Offline
        Ronel_qtmaster
        wrote on last edited by
        #3

        @Pl45m4 translucent background and frameless window are not sufficient to achieve it.You can try by yourself

        Pl45m4P 1 Reply Last reply
        0
        • Ronel_qtmasterR Ronel_qtmaster

          @Pl45m4 translucent background and frameless window are not sufficient to achieve it.You can try by yourself

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #4

          @Ronel_qtmaster

          Yes, in addition you painted the window blue with a transparent gradient.


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          1
          • C Offline
            C Offline
            CPPUIX
            wrote on last edited by
            #5

            Hi,

            Thanks for sharing.

            You might find these links useful, they contain more information about this:

            • Qt Widgets Examples — Translucent Background
            • Frameless and transparent window
            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