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. Qwindow setOpacity on a Raspberry Pi4
Forum Updated to NodeBB v4.3 + New Features

Qwindow setOpacity on a Raspberry Pi4

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 480 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
    rbn1
    wrote on last edited by
    #1

    I am building Sonic Pi wth Qt GUI on a Pi4 running latest Raspbian Buster. Everything works fine apart from being able to vary the opacity of the main window. The same code builds and works on Mac, Windows PI and various Linux eg Ubuntu, but on the Pi4 the slider which control the opacity has no effect, and neither does it generate any errors. Any ideas on why it doesn't work or what I might investigate to get it going. (Qt version is 5.11.3)

    void MainWindow::changeGUITransparency(int val) {
        // scale it linearly from 0 -> 100 to 0.3 -> 1
        setWindowOpacity((0.7 * ((100 - (float)val) / 100.0))  + 0.3);
    }
    
    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I dont know Ras Buster so i wondering if supports setWindowOpacity

      Note from the docs.
      This feature is available on Embedded Linux, macOS, Windows, and X11 platforms that support the Composite extension.
      Note: On X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rbn1
        wrote on last edited by
        #3

        solved it. xcompmgr was installed wasn't running. When I started this everything worked.

        Christian EhrlicherC 1 Reply Last reply
        3
        • R rbn1

          solved it. xcompmgr was installed wasn't running. When I started this everything worked.

          Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @rbn1 Then please mark the topic as solved, thx.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          2
          • R Offline
            R Offline
            rbn1
            wrote on last edited by
            #5

            Sorry.Marked as solved now

            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