Using layershell-qt
Ralf Van Bogaert
ralf.vanbogaert at gmail.com
Fri Sep 23 12:19:05 BST 2022
Hi,
I am developing a Qt6-based application, that needs to display a QWindow as
a desktop panel on Wayland compositors - so at the edge of the screen, and
never overlapped by maximized windows.
To do this, I need to use the layershell-qt
<https://invent.kde.org/plasma/layer-shell-qt> library.
If I compile the library as-is, it uses my system's Qt5 installation. The
included test program works fine.
However I need to compile the library for use with Qt6. If I do this, the
test program doesn't display it's window anymore but prints the following
output instead:
*qt.qpa.wayland: No shell integration named "layer-shell"
foundqt.qpa.wayland: Loading shell integration failed.qt.qpa.wayland:
Attempted to load the following shells QList("layer-shell")*
The same goes for my program. The function
*LayerShellQt::Shell::useLayerShell()*
needs to be ran before creating any windows, which executes
*void Shell::useLayerShell(){ const bool ret =
qputenv("QT_WAYLAND_SHELL_INTEGRATION", "layer-shell"); if (!ret) {
qCDebug(LAYERSHELLQT) << "Unable to set
QT_WAYLAND_SHELL_INTEGRATION=layer-shell"; }}*
Can anyone help?
Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20220923/3322da9b/attachment.htm>
More information about the Plasma-devel
mailing list