Important: Please read the Qt Code of Conduct -

Qwindow setOpacity on a Raspberry Pi4

  • 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);

  • Lifetime Qt Champion

    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.

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

  • Lifetime Qt Champion

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

  • Sorry.Marked as solved now

Log in to reply