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 705 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.
  • R Offline
    R Offline
    Ronel_qtmaster
    wrote on 5 Mar 2024, 17:02 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

    P 1 Reply Last reply 5 Mar 2024, 17:46
    0
    • R Ronel_qtmaster
      5 Mar 2024, 17:02

      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

      P Online
      P Online
      Pl45m4
      wrote on 5 Mar 2024, 17:46 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

      R 1 Reply Last reply 5 Mar 2024, 17:57
      0
      • P Pl45m4
        5 Mar 2024, 17:46

        @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.

        R Offline
        R Offline
        Ronel_qtmaster
        wrote on 5 Mar 2024, 17:57 last edited by
        #3

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

        P 1 Reply Last reply 5 Mar 2024, 19:49
        0
        • R Ronel_qtmaster
          5 Mar 2024, 17:57

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

          P Online
          P Online
          Pl45m4
          wrote on 5 Mar 2024, 19:49 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 6 Mar 2024, 13:41 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

            1/5

            5 Mar 2024, 17:02

            • Login

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