Best way to use layer-shell-qt

I want to make a panel/bar that displays workspace-specific taskbars. I need it as a visual indicator of where the opened programs are. In X11 (bspwm), I have tint2 that does it. I don’t have a similar panel setup in Wayland (Hyprland). To implement such a panel, I am using layer-shell-qt.

The prototype I built uses QWidget to show Hyprland clients (opened programs). Now, layer-shell-qt works with QWindow only. I had to “show > hide > show” the QWidget to get the associated QWindow and make the layer shell work. This feels hacky to me. Also, due to hiding the widget, the layout changes significantly and I need even more hacky solutions to keep the widget layout the same throughout.

I am new to Qt, so I am unsure if using QWidget is the best way. I could not find other applications that use layer-shell-qt in a similar way to base my application on. I would appreciate any suggestions.

I was redirected here from the Qt forum.


Check this post, It can help you. Good Luck :smiley:

1 Like